usar tabs acá

This commit is contained in:
f 2021-03-23 11:37:14 -03:00
parent 85efaf988a
commit 3fdbd01b78

View file

@ -278,19 +278,19 @@ function setupEditor (editorEl: HTMLElement): void {
} }
document.addEventListener("turbolinks:load", () => { document.addEventListener("turbolinks:load", () => {
const flash = document.querySelector<HTMLElement>('.js-flash') const flash = document.querySelector<HTMLElement>('.js-flash')
if (flash) { if (flash) {
const keys = JSON.parse(flash.dataset.keys || '[]') const keys = JSON.parse(flash.dataset.keys || '[]')
switch (flash.dataset.target) { switch (flash.dataset.target) {
case 'editor': case 'editor':
switch (flash.dataset.action) { switch (flash.dataset.action) {
case 'forget-content': case 'forget-content':
keys.forEach(forgetContent) keys.forEach(forgetContent)
} }
} }
} }
for (const editorEl of document.querySelectorAll<HTMLElement>('.editor[data-editor]')) { for (const editorEl of document.querySelectorAll<HTMLElement>('.editor[data-editor]')) {
try { try {