From f03479fad56085ab81d7a3e9613fece26e93759c Mon Sep 17 00:00:00 2001 From: void Date: Wed, 18 Nov 2020 22:51:15 -0300 Subject: [PATCH] aviso cuando pegas de word (#130) --- app/assets/javascripts/02-editor.js | 3 +++ app/assets/stylesheets/editor.scss | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/app/assets/javascripts/02-editor.js b/app/assets/javascripts/02-editor.js index ec4cf34b..a11362d2 100644 --- a/app/assets/javascripts/02-editor.js +++ b/app/assets/javascripts/02-editor.js @@ -416,6 +416,9 @@ function setupEditor (editorEl) { range.collapse() } }) + contentEl.addEventListener("paste", event => { + contentEl.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 4b89cf1a..95c7a07a 100644 --- a/app/assets/stylesheets/editor.scss +++ b/app/assets/stylesheets/editor.scss @@ -35,6 +35,11 @@ background: white; } + .editor-aviso-word { + color: red; + display: none; + } + .editor-primary-toolbar, .editor-auxiliary-toolbar { display: block; overflow-x: auto;