MDL-41098 atto: Force some styles on the editor

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.
This commit is contained in:
Damyon Wiese
2013-08-27 10:40:24 +08:00
parent c90641facb
commit 08a95d50bb
4 changed files with 10 additions and 1 deletions
@@ -292,6 +292,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();
File diff suppressed because one or more lines are too long
@@ -292,6 +292,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();
+3
View 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();