diff --git a/src/js/core.js b/src/js/core.js index c203a7ef5..de987225e 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -413,6 +413,7 @@ var elementId = MediumEditor.util.guid(); element.setAttribute('data-medium-editor-element', true); + element.classList.add('medium-editor-element'); element.setAttribute('role', 'textbox'); element.setAttribute('aria-multiline', true); element.setAttribute('data-medium-editor-editor-index', editorId); @@ -701,6 +702,7 @@ element.removeAttribute('contentEditable'); element.removeAttribute('spellcheck'); element.removeAttribute('data-medium-editor-element'); + element.classList.remove('medium-editor-element'); element.removeAttribute('role'); element.removeAttribute('aria-multiline'); element.removeAttribute('medium-editor-index'); diff --git a/src/sass/medium-editor.scss b/src/sass/medium-editor.scss index 2f470d604..b33bd573c 100644 --- a/src/sass/medium-editor.scss +++ b/src/sass/medium-editor.scss @@ -9,7 +9,7 @@ @import "util/clearfix"; // contenteditable rules -[data-medium-editor-element] { +.medium-editor-element { word-wrap: break-word; min-height: 30px;