From 3535ea057f7665a7476f7cf9399d749c4545b7ec Mon Sep 17 00:00:00 2001 From: void Date: Sat, 9 Jan 2021 19:20:59 +0000 Subject: [PATCH] editor: arreglar el aviso de word MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit al pegar, ahora si se muestra un aviso de word, y se arregló el css para que no tape el texto del editor. --- app/assets/javascripts/02-editor.js | 2 +- app/assets/stylesheets/editor.scss | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/02-editor.js b/app/assets/javascripts/02-editor.js index c7e4c1b..b95fe17 100644 --- a/app/assets/javascripts/02-editor.js +++ b/app/assets/javascripts/02-editor.js @@ -444,7 +444,7 @@ function setupEditor (editorEl) { } }) contentEl.addEventListener("paste", event => { - contentEl.querySelector(".editor-aviso-word").style.display = "block" + editorEl.querySelector(".editor-aviso-word").style.display = "block" }) document.addEventListener("selectionchange", event => { cleanContent(contentEl) diff --git a/app/assets/stylesheets/editor.scss b/app/assets/stylesheets/editor.scss index a4fc7dc..d1125ab 100644 --- a/app/assets/stylesheets/editor.scss +++ b/app/assets/stylesheets/editor.scss @@ -35,7 +35,10 @@ background: white; } - .editor-aviso-word { display: none; } + .editor-aviso-word { + display: none; + position: initial; /* evitar que tape el texto */ + } .editor-primary-toolbar, .editor-auxiliary-toolbar { display: block;