@zohodesk/dot 1.0.0-beta.261 → 1.0.0-beta.262
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -188,17 +188,16 @@ export default class TextEditor extends Component {
|
|
|
188
188
|
if (!global.editor[id]) {
|
|
189
189
|
global.editor[id] = editorObj;
|
|
190
190
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
191
|
+
const css = 'pre {white-space: pre-wrap}',
|
|
192
|
+
head = editorObj.doc.head || editorObj.doc.getElementsByTagName('head')[0],
|
|
193
|
+
style = document.createElement('style');
|
|
194
|
+
style.type = 'text/css';
|
|
195
|
+
if (style.styleSheet) {
|
|
196
|
+
style.styleSheet.cssText = css;
|
|
197
|
+
} else {
|
|
198
|
+
style.appendChild(editorObj.doc.createTextNode(css));
|
|
199
|
+
}
|
|
200
|
+
head.appendChild(style);
|
|
202
201
|
editorCallback && editorCallback(editorObj);
|
|
203
202
|
const iframe = selectn('iframe.contentDocument.body', editorObj) || null;
|
|
204
203
|
const iframeHead = selectn('iframe.contentDocument.head', editorObj) || null;
|
|
@@ -215,17 +215,16 @@ var TextEditor = /*#__PURE__*/function (_Component) {
|
|
|
215
215
|
if (!global.editor[id]) {
|
|
216
216
|
global.editor[id] = editorObj;
|
|
217
217
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
218
|
+
var css = 'pre {white-space: pre-wrap}',
|
|
219
|
+
head = editorObj.doc.head || editorObj.doc.getElementsByTagName('head')[0],
|
|
220
|
+
style = document.createElement('style');
|
|
221
|
+
style.type = 'text/css';
|
|
222
|
+
if (style.styleSheet) {
|
|
223
|
+
style.styleSheet.cssText = css;
|
|
224
|
+
} else {
|
|
225
|
+
style.appendChild(editorObj.doc.createTextNode(css));
|
|
226
|
+
}
|
|
227
|
+
head.appendChild(style);
|
|
229
228
|
editorCallback && editorCallback(editorObj);
|
|
230
229
|
var iframe = (0, _selectn["default"])('iframe.contentDocument.body', editorObj) || null;
|
|
231
230
|
var iframeHead = (0, _selectn["default"])('iframe.contentDocument.head', editorObj) || null;
|