MDL-41098 atto: Force some styles on the editor
authorDamyon Wiese <damyon@moodle.com>
Mon, 26 Aug 2013 14:05:05 +0000 (22:05 +0800)
committerDamyon Wiese <damyon@moodle.com>
Tue, 27 Aug 2013 02:40:24 +0000 (10:40 +0800)
Bootstrap is overriding random styles on the contenteditable div like:
line-height, font-size and color. Silly - force them to be the same as the
textarea we are derived from.

lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js
lib/editor/atto/yui/src/editor/js/editor.js

index 82a3d47..93153cf 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js differ
index 8c038da..e780c24 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js differ
index 82a3d47..93153cf 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js differ
index a2d967d..3e807cd 100644 (file)
@@ -290,6 +290,9 @@ M.editor_atto = M.editor_atto || {
         textarea.get('parentNode').insert(toolbar, textarea);
         // Add the editable div to the page.
         textarea.get('parentNode').insert(atto, textarea);
+        atto.setStyle('color', textarea.getStyle('color'));
+        atto.setStyle('lineHeight', textarea.getStyle('lineHeight'));
+        atto.setStyle('fontSize', textarea.getStyle('fontSize'));
         // Hide the old textarea.
         textarea.hide();