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:
+3
@@ -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();
|
||||
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+3
@@ -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
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user