@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
@@ -2,6 +2,10 @@
2
2
 
3
3
  In this Library, we Provide Some Basic Components to Build Your Application
4
4
 
5
+ # 1.0.0-beta.262
6
+
7
+ - **TextEditor** - pre tag css style added.
8
+
5
9
  # 1.0.0-beta.261
6
10
 
7
11
  - **TextEditor** - pre tag css style reverted.
@@ -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
- // 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);
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
- // const 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);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/dot",
3
- "version": "1.0.0-beta.261",
3
+ "version": "1.0.0-beta.262",
4
4
  "main": "lib/index",
5
5
  "module": "es/index.js",
6
6
  "private": false,