suneditor 3.0.0-alpha.9 → 3.0.0-beta.2
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/CONTRIBUTING.md +170 -22
- package/{LICENSE.txt → LICENSE} +9 -9
- package/README.md +168 -30
- package/dist/suneditor.min.css +1 -1
- package/dist/suneditor.min.js +1 -1
- package/package.json +47 -21
- package/src/assets/design/color.css +121 -0
- package/src/assets/design/index.css +3 -0
- package/src/assets/design/size.css +35 -0
- package/src/assets/design/typography.css +37 -0
- package/src/assets/icons/defaultIcons.js +232 -0
- package/src/assets/suneditor-contents.css +181 -46
- package/src/assets/suneditor.css +1403 -650
- package/src/core/base/eventHandlers/handler_toolbar.js +35 -14
- package/src/core/base/eventHandlers/handler_ww_clipboard.js +23 -4
- package/src/core/base/eventHandlers/handler_ww_dragDrop.js +49 -10
- package/src/core/base/eventHandlers/handler_ww_key_input.js +422 -224
- package/src/core/base/eventHandlers/handler_ww_mouse.js +83 -36
- package/src/core/base/eventManager.js +520 -179
- package/src/core/base/history.js +95 -41
- package/src/core/class/char.js +26 -11
- package/src/core/class/component.js +345 -137
- package/src/core/class/format.js +683 -519
- package/src/core/class/html.js +485 -305
- package/src/core/class/menu.js +133 -47
- package/src/core/class/nodeTransform.js +90 -71
- package/src/core/class/offset.js +408 -92
- package/src/core/class/selection.js +216 -106
- package/src/core/class/shortcuts.js +68 -8
- package/src/core/class/toolbar.js +106 -116
- package/src/core/class/ui.js +422 -0
- package/src/core/class/viewer.js +178 -74
- package/src/core/editor.js +496 -389
- package/src/core/section/actives.js +123 -27
- package/src/core/section/constructor.js +615 -206
- package/src/core/section/context.js +28 -23
- package/src/core/section/documentType.js +561 -0
- package/src/editorInjector/_classes.js +19 -5
- package/src/editorInjector/_core.js +71 -7
- package/src/editorInjector/index.js +63 -1
- package/src/events.js +622 -0
- package/src/helper/clipboard.js +59 -0
- package/src/helper/converter.js +202 -26
- package/src/helper/dom/domCheck.js +304 -0
- package/src/helper/dom/domQuery.js +669 -0
- package/src/helper/dom/domUtils.js +557 -0
- package/src/helper/dom/index.js +12 -0
- package/src/helper/env.js +46 -56
- package/src/helper/index.js +10 -4
- package/src/helper/keyCodeMap.js +183 -0
- package/src/helper/numbers.js +12 -8
- package/src/helper/unicode.js +9 -5
- package/src/langs/ckb.js +74 -4
- package/src/langs/cs.js +72 -2
- package/src/langs/da.js +73 -3
- package/src/langs/de.js +73 -4
- package/src/langs/en.js +23 -3
- package/src/langs/es.js +73 -4
- package/src/langs/fa.js +75 -3
- package/src/langs/fr.js +73 -3
- package/src/langs/he.js +73 -4
- package/src/langs/hu.js +230 -0
- package/src/langs/index.js +7 -3
- package/src/langs/it.js +70 -1
- package/src/langs/ja.js +72 -4
- package/src/langs/km.js +230 -0
- package/src/langs/ko.js +22 -2
- package/src/langs/lv.js +74 -5
- package/src/langs/nl.js +73 -4
- package/src/langs/pl.js +73 -4
- package/src/langs/pt_br.js +70 -1
- package/src/langs/ro.js +74 -5
- package/src/langs/ru.js +73 -4
- package/src/langs/se.js +73 -4
- package/src/langs/tr.js +73 -1
- package/src/langs/{ua.js → uk.js} +75 -6
- package/src/langs/ur.js +77 -8
- package/src/langs/zh_cn.js +74 -5
- package/src/modules/ApiManager.js +77 -54
- package/src/modules/Browser.js +667 -0
- package/src/modules/ColorPicker.js +162 -102
- package/src/modules/Controller.js +273 -142
- package/src/modules/Figure.js +925 -484
- package/src/modules/FileManager.js +121 -69
- package/src/modules/HueSlider.js +113 -61
- package/src/modules/Modal.js +291 -122
- package/src/modules/ModalAnchorEditor.js +383 -234
- package/src/modules/SelectMenu.js +270 -168
- package/src/modules/_DragHandle.js +2 -1
- package/src/modules/index.js +3 -3
- package/src/plugins/browser/audioGallery.js +83 -0
- package/src/plugins/browser/fileBrowser.js +103 -0
- package/src/plugins/browser/fileGallery.js +83 -0
- package/src/plugins/browser/imageGallery.js +81 -0
- package/src/plugins/browser/videoGallery.js +103 -0
- package/src/plugins/command/blockquote.js +40 -27
- package/src/plugins/command/exportPDF.js +134 -0
- package/src/plugins/command/fileUpload.js +229 -162
- package/src/plugins/command/list_bulleted.js +83 -47
- package/src/plugins/command/list_numbered.js +83 -47
- package/src/plugins/dropdown/align.js +66 -54
- package/src/plugins/dropdown/backgroundColor.js +63 -49
- package/src/plugins/dropdown/font.js +71 -47
- package/src/plugins/dropdown/fontColor.js +63 -48
- package/src/plugins/dropdown/formatBlock.js +70 -33
- package/src/plugins/dropdown/hr.js +92 -51
- package/src/plugins/dropdown/layout.js +37 -26
- package/src/plugins/dropdown/lineHeight.js +54 -38
- package/src/plugins/dropdown/list.js +60 -45
- package/src/plugins/dropdown/paragraphStyle.js +51 -30
- package/src/plugins/dropdown/table.js +2003 -813
- package/src/plugins/dropdown/template.js +38 -26
- package/src/plugins/dropdown/textStyle.js +43 -31
- package/src/plugins/field/mention.js +147 -86
- package/src/plugins/index.js +32 -6
- package/src/plugins/input/fontSize.js +161 -108
- package/src/plugins/input/pageNavigator.js +70 -0
- package/src/plugins/modal/audio.js +358 -173
- package/src/plugins/modal/drawing.js +531 -0
- package/src/plugins/modal/embed.js +886 -0
- package/src/plugins/modal/image.js +674 -362
- package/src/plugins/modal/link.js +100 -71
- package/src/plugins/modal/math.js +367 -167
- package/src/plugins/modal/video.js +691 -335
- package/src/plugins/popup/anchor.js +222 -0
- package/src/suneditor.js +50 -13
- package/src/themes/dark.css +122 -0
- package/src/typedef.js +130 -0
- package/types/assets/icons/defaultIcons.d.ts +153 -0
- package/types/core/base/eventHandlers/handler_toolbar.d.ts +41 -0
- package/types/core/base/eventHandlers/handler_ww_clipboard.d.ts +40 -0
- package/types/core/base/eventHandlers/handler_ww_dragDrop.d.ts +35 -0
- package/types/core/base/eventHandlers/handler_ww_key_input.d.ts +45 -0
- package/types/core/base/eventHandlers/handler_ww_mouse.d.ts +39 -0
- package/types/core/base/eventManager.d.ts +385 -0
- package/types/core/base/history.d.ts +81 -0
- package/types/core/class/char.d.ts +60 -0
- package/types/core/class/component.d.ts +212 -0
- package/types/core/class/format.d.ts +616 -0
- package/types/core/class/html.d.ts +422 -0
- package/types/core/class/menu.d.ts +126 -0
- package/types/core/class/nodeTransform.d.ts +93 -0
- package/types/core/class/offset.d.ts +522 -0
- package/types/core/class/selection.d.ts +188 -0
- package/types/core/class/shortcuts.d.ts +142 -0
- package/types/core/class/toolbar.d.ts +189 -0
- package/types/core/class/ui.d.ts +164 -0
- package/types/core/class/viewer.d.ts +140 -0
- package/types/core/editor.d.ts +610 -0
- package/types/core/section/actives.d.ts +46 -0
- package/types/core/section/constructor.d.ts +777 -0
- package/types/core/section/context.d.ts +45 -0
- package/types/core/section/documentType.d.ts +178 -0
- package/types/editorInjector/_classes.d.ts +41 -0
- package/types/editorInjector/_core.d.ts +92 -0
- package/types/editorInjector/index.d.ts +71 -0
- package/types/events.d.ts +273 -0
- package/types/helper/clipboard.d.ts +12 -0
- package/types/helper/converter.d.ts +197 -0
- package/types/helper/dom/domCheck.d.ts +189 -0
- package/types/helper/dom/domQuery.d.ts +223 -0
- package/types/helper/dom/domUtils.d.ts +226 -0
- package/types/helper/dom/index.d.ts +9 -0
- package/types/helper/env.d.ts +132 -0
- package/types/helper/index.d.ts +174 -0
- package/types/helper/keyCodeMap.d.ts +110 -0
- package/types/helper/numbers.d.ts +46 -0
- package/types/helper/unicode.d.ts +28 -0
- package/types/index.d.ts +120 -0
- package/{typings/Lang.d.ts → types/langs/_Lang.d.ts} +173 -103
- package/types/langs/ckb.d.ts +3 -0
- package/types/langs/cs.d.ts +3 -0
- package/types/langs/da.d.ts +3 -0
- package/types/langs/de.d.ts +3 -0
- package/types/langs/en.d.ts +3 -0
- package/types/langs/es.d.ts +3 -0
- package/types/langs/fa.d.ts +3 -0
- package/types/langs/fr.d.ts +3 -0
- package/types/langs/he.d.ts +3 -0
- package/types/langs/hu.d.ts +3 -0
- package/types/langs/index.d.ts +54 -0
- package/types/langs/it.d.ts +3 -0
- package/types/langs/ja.d.ts +3 -0
- package/types/langs/km.d.ts +3 -0
- package/types/langs/ko.d.ts +3 -0
- package/types/langs/lv.d.ts +3 -0
- package/types/langs/nl.d.ts +3 -0
- package/types/langs/pl.d.ts +3 -0
- package/types/langs/pt_br.d.ts +3 -0
- package/types/langs/ro.d.ts +3 -0
- package/types/langs/ru.d.ts +3 -0
- package/types/langs/se.d.ts +3 -0
- package/types/langs/tr.d.ts +3 -0
- package/types/langs/uk.d.ts +3 -0
- package/types/langs/ur.d.ts +3 -0
- package/types/langs/zh_cn.d.ts +3 -0
- package/types/modules/ApiManager.d.ts +125 -0
- package/types/modules/Browser.d.ts +326 -0
- package/types/modules/ColorPicker.d.ts +131 -0
- package/types/modules/Controller.d.ts +251 -0
- package/types/modules/Figure.d.ts +517 -0
- package/types/modules/FileManager.d.ts +202 -0
- package/types/modules/HueSlider.d.ts +136 -0
- package/types/modules/Modal.d.ts +111 -0
- package/types/modules/ModalAnchorEditor.d.ts +236 -0
- package/types/modules/SelectMenu.d.ts +194 -0
- package/types/modules/_DragHandle.d.ts +7 -0
- package/types/modules/index.d.ts +26 -0
- package/types/plugins/browser/audioGallery.d.ts +55 -0
- package/types/plugins/browser/fileBrowser.d.ts +64 -0
- package/types/plugins/browser/fileGallery.d.ts +55 -0
- package/types/plugins/browser/imageGallery.d.ts +51 -0
- package/types/plugins/browser/videoGallery.d.ts +57 -0
- package/types/plugins/command/blockquote.d.ts +28 -0
- package/types/plugins/command/exportPDF.d.ts +46 -0
- package/types/plugins/command/fileUpload.d.ts +156 -0
- package/types/plugins/command/list_bulleted.d.ts +46 -0
- package/types/plugins/command/list_numbered.d.ts +46 -0
- package/types/plugins/dropdown/align.d.ts +60 -0
- package/types/plugins/dropdown/backgroundColor.d.ts +63 -0
- package/types/plugins/dropdown/font.d.ts +54 -0
- package/types/plugins/dropdown/fontColor.d.ts +63 -0
- package/types/plugins/dropdown/formatBlock.d.ts +54 -0
- package/types/plugins/dropdown/hr.d.ts +71 -0
- package/types/plugins/dropdown/layout.d.ts +40 -0
- package/types/plugins/dropdown/lineHeight.d.ts +50 -0
- package/types/plugins/dropdown/list.d.ts +39 -0
- package/types/plugins/dropdown/paragraphStyle.d.ts +54 -0
- package/types/plugins/dropdown/table.d.ts +627 -0
- package/types/plugins/dropdown/template.d.ts +40 -0
- package/types/plugins/dropdown/textStyle.d.ts +41 -0
- package/types/plugins/field/mention.d.ts +102 -0
- package/types/plugins/index.d.ts +107 -0
- package/types/plugins/input/fontSize.d.ts +170 -0
- package/types/plugins/input/pageNavigator.d.ts +28 -0
- package/types/plugins/modal/audio.d.ts +269 -0
- package/types/plugins/modal/drawing.d.ts +246 -0
- package/types/plugins/modal/embed.d.ts +387 -0
- package/types/plugins/modal/image.d.ts +451 -0
- package/types/plugins/modal/link.d.ts +128 -0
- package/types/plugins/modal/math.d.ts +193 -0
- package/types/plugins/modal/video.d.ts +485 -0
- package/types/plugins/popup/anchor.d.ts +56 -0
- package/types/suneditor.d.ts +51 -0
- package/types/typedef.d.ts +233 -0
- package/.eslintignore +0 -7
- package/.eslintrc.json +0 -64
- package/src/assets/icons/_default.js +0 -194
- package/src/core/base/events.js +0 -320
- package/src/core/class/notice.js +0 -42
- package/src/helper/domUtils.js +0 -1177
- package/src/modules/FileBrowser.js +0 -271
- package/src/plugins/command/exportPdf.js +0 -168
- package/src/plugins/fileBrowser/imageGallery.js +0 -81
- package/src/themes/test.css +0 -61
- package/typings/CommandPlugin.d.ts +0 -8
- package/typings/DialogPlugin.d.ts +0 -20
- package/typings/FileBrowserPlugin.d.ts +0 -30
- package/typings/Module.d.ts +0 -15
- package/typings/Plugin.d.ts +0 -42
- package/typings/SubmenuPlugin.d.ts +0 -8
- package/typings/_classes.d.ts +0 -17
- package/typings/_colorPicker.d.ts +0 -60
- package/typings/_core.d.ts +0 -55
- package/typings/align.d.ts +0 -5
- package/typings/audio.d.ts +0 -5
- package/typings/backgroundColor.d.ts +0 -5
- package/typings/blockquote.d.ts +0 -5
- package/typings/char.d.ts +0 -39
- package/typings/component.d.ts +0 -38
- package/typings/context.d.ts +0 -39
- package/typings/converter.d.ts +0 -33
- package/typings/dialog.d.ts +0 -28
- package/typings/domUtils.d.ts +0 -361
- package/typings/editor.d.ts +0 -7
- package/typings/editor.ts +0 -542
- package/typings/env.d.ts +0 -70
- package/typings/eventManager.d.ts +0 -37
- package/typings/events.d.ts +0 -262
- package/typings/fileBrowser.d.ts +0 -42
- package/typings/fileManager.d.ts +0 -67
- package/typings/font.d.ts +0 -5
- package/typings/fontColor.d.ts +0 -5
- package/typings/fontSize.d.ts +0 -5
- package/typings/format.d.ts +0 -191
- package/typings/formatBlock.d.ts +0 -5
- package/typings/history.d.ts +0 -48
- package/typings/horizontalRule.d.ts +0 -5
- package/typings/image.d.ts +0 -5
- package/typings/imageGallery.d.ts +0 -5
- package/typings/index.d.ts +0 -21
- package/typings/index.modules.d.ts +0 -11
- package/typings/index.plugins.d.ts +0 -58
- package/typings/lineHeight.d.ts +0 -5
- package/typings/link.d.ts +0 -5
- package/typings/list.d.ts +0 -5
- package/typings/math.d.ts +0 -5
- package/typings/mediaContainer.d.ts +0 -25
- package/typings/mention.d.ts +0 -5
- package/typings/node.d.ts +0 -57
- package/typings/notice.d.ts +0 -16
- package/typings/numbers.d.ts +0 -29
- package/typings/offset.d.ts +0 -24
- package/typings/options.d.ts +0 -589
- package/typings/paragraphStyle.d.ts +0 -5
- package/typings/resizing.d.ts +0 -141
- package/typings/selection.d.ts +0 -94
- package/typings/shortcuts.d.ts +0 -13
- package/typings/suneditor.d.ts +0 -9
- package/typings/table.d.ts +0 -5
- package/typings/template.d.ts +0 -5
- package/typings/textStyle.d.ts +0 -5
- package/typings/toolbar.d.ts +0 -32
- package/typings/unicode.d.ts +0 -25
- package/typings/video.d.ts +0 -5
package/src/core/class/viewer.js
CHANGED
|
@@ -3,9 +3,19 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import CoreInjector from '../../editorInjector/_core';
|
|
6
|
-
import {
|
|
6
|
+
import { dom, env, converter, numbers } from '../../helper';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {Omit<Viewer & Partial<__se__EditorInjector>, 'viewer'>} ViewerThis
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @constructor
|
|
14
|
+
* @this {ViewerThis}
|
|
15
|
+
* @description Viewer(codeView, fullScreen, showBlocks) class
|
|
16
|
+
* @param {__se__EditorCore} editor - The root editor instance
|
|
17
|
+
*/
|
|
18
|
+
function Viewer(editor) {
|
|
9
19
|
CoreInjector.call(this, editor);
|
|
10
20
|
|
|
11
21
|
// members
|
|
@@ -22,12 +32,13 @@ const Viewer = function (editor) {
|
|
|
22
32
|
this.fullScreenBalloon = false;
|
|
23
33
|
this.fullScreenInline = false;
|
|
24
34
|
this.toolbarParent = null;
|
|
25
|
-
}
|
|
35
|
+
}
|
|
26
36
|
|
|
27
37
|
Viewer.prototype = {
|
|
28
38
|
/**
|
|
39
|
+
* @this {ViewerThis}
|
|
29
40
|
* @description Changes to code view or wysiwyg view
|
|
30
|
-
* @param {boolean
|
|
41
|
+
* @param {boolean=} value true/false, If undefined toggle the codeView mode.
|
|
31
42
|
*/
|
|
32
43
|
codeView(value) {
|
|
33
44
|
const fc = this.editor.frameContext;
|
|
@@ -35,12 +46,13 @@ Viewer.prototype = {
|
|
|
35
46
|
if (value === fc.get('isCodeView')) return;
|
|
36
47
|
|
|
37
48
|
fc.set('isCodeView', value);
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
49
|
+
this.ui._offCurrentController();
|
|
50
|
+
this.ui._offCurrentModal();
|
|
40
51
|
|
|
41
52
|
const codeWrapper = fc.get('codeWrapper');
|
|
42
53
|
const codeFrame = fc.get('code');
|
|
43
54
|
const wysiwygFrame = fc.get('wysiwygFrame');
|
|
55
|
+
const wrapper = fc.get('wrapper');
|
|
44
56
|
|
|
45
57
|
if (value) {
|
|
46
58
|
this._setEditorDataToCodeView();
|
|
@@ -76,9 +88,10 @@ Viewer.prototype = {
|
|
|
76
88
|
|
|
77
89
|
this.status._range = null;
|
|
78
90
|
codeFrame.focus();
|
|
79
|
-
|
|
91
|
+
dom.utils.addClass(this.editor.commandTargets.get('codeView'), 'active');
|
|
92
|
+
dom.utils.addClass(wrapper, 'se-code-view-status');
|
|
80
93
|
} else {
|
|
81
|
-
if (!
|
|
94
|
+
if (!dom.check.isNonEditable(wysiwygFrame)) this._setCodeDataToEditor();
|
|
82
95
|
wysiwygFrame.scrollTop = 0;
|
|
83
96
|
codeWrapper.style.setProperty('display', 'none', 'important');
|
|
84
97
|
wysiwygFrame.style.display = 'block';
|
|
@@ -96,24 +109,36 @@ Viewer.prototype = {
|
|
|
96
109
|
}
|
|
97
110
|
|
|
98
111
|
this.editor._nativeFocus();
|
|
99
|
-
|
|
112
|
+
dom.utils.removeClass(this.editor.commandTargets.get('codeView'), 'active');
|
|
100
113
|
|
|
101
|
-
if (!
|
|
114
|
+
if (!dom.check.isNonEditable(wysiwygFrame)) {
|
|
102
115
|
this.history.push(false);
|
|
103
116
|
this.history.resetButtons(fc.get('key'), null);
|
|
104
117
|
}
|
|
118
|
+
dom.utils.removeClass(wrapper, 'se-code-view-status');
|
|
105
119
|
}
|
|
106
120
|
|
|
107
|
-
this.editor._checkPlaceholder();
|
|
108
|
-
|
|
121
|
+
this.editor._checkPlaceholder(fc);
|
|
122
|
+
dom.utils.setDisabled(this.editor._codeViewDisabledButtons, value);
|
|
123
|
+
|
|
124
|
+
// document type
|
|
125
|
+
if (fc.has('documentType-use-header')) {
|
|
126
|
+
if (value) {
|
|
127
|
+
fc.get('documentTypeInner').style.display = 'none';
|
|
128
|
+
} else {
|
|
129
|
+
fc.get('documentTypeInner').style.display = '';
|
|
130
|
+
fc.get('documentType').reHeader();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
109
133
|
|
|
110
134
|
// user event
|
|
111
135
|
this.triggerEvent('onToggleCodeView', { frameContext: fc, is: fc.get('isCodeView') });
|
|
112
136
|
},
|
|
113
137
|
|
|
114
138
|
/**
|
|
139
|
+
* @this {ViewerThis}
|
|
115
140
|
* @description Changes to full screen or default screen
|
|
116
|
-
* @param {boolean
|
|
141
|
+
* @param {boolean=} value true/false, If undefined toggle the codeView mode.
|
|
117
142
|
*/
|
|
118
143
|
fullScreen(value) {
|
|
119
144
|
const fc = this.editor.frameContext;
|
|
@@ -131,7 +156,7 @@ Viewer.prototype = {
|
|
|
131
156
|
const isCodeView = this.editor.frameContext.get('isCodeView');
|
|
132
157
|
const arrow = this.context.get('toolbar._arrow');
|
|
133
158
|
|
|
134
|
-
this.
|
|
159
|
+
this.ui._offCurrentController();
|
|
135
160
|
const wasToolbarHidden = toolbar.style.display === 'none' || (this.editor.isInline && !this.editor.toolbar._inlineToolbarAttr.isShow);
|
|
136
161
|
|
|
137
162
|
if (value) {
|
|
@@ -168,7 +193,7 @@ Viewer.prototype = {
|
|
|
168
193
|
if (fc.get('_stickyDummy').style.display !== 'none' && fc.get('_stickyDummy').style.display !== '') {
|
|
169
194
|
this.fullScreenSticky = true;
|
|
170
195
|
fc.get('_stickyDummy').style.display = 'none';
|
|
171
|
-
|
|
196
|
+
dom.utils.removeClass(toolbar, 'se-toolbar-sticky');
|
|
172
197
|
}
|
|
173
198
|
|
|
174
199
|
this.bodyOverflow = this._d.body.style.overflow;
|
|
@@ -203,8 +228,8 @@ Viewer.prototype = {
|
|
|
203
228
|
|
|
204
229
|
const reductionIcon = this.icons.reduction;
|
|
205
230
|
this.editor.applyCommandTargets('fullScreen', (e) => {
|
|
206
|
-
|
|
207
|
-
|
|
231
|
+
dom.utils.changeElement(e.firstElementChild, reductionIcon);
|
|
232
|
+
dom.utils.addClass(e, 'active');
|
|
208
233
|
});
|
|
209
234
|
} else {
|
|
210
235
|
// frame
|
|
@@ -224,7 +249,7 @@ Viewer.prototype = {
|
|
|
224
249
|
if (arrow) arrow.style.cssText = this.arrowOriginCssText;
|
|
225
250
|
this._d.body.style.overflow = this.bodyOverflow;
|
|
226
251
|
|
|
227
|
-
if (this.editor.frameOptions.get('height') === 'auto' && !this.options.get('hasCodeMirror')) this._codeViewAutoHeight(fc);
|
|
252
|
+
if (this.editor.frameOptions.get('height') === 'auto' && !this.options.get('hasCodeMirror')) this._codeViewAutoHeight(fc.get('code'), fc.get('codeNumbers'), true);
|
|
228
253
|
|
|
229
254
|
if (this.toolbarParent) {
|
|
230
255
|
this.toolbarParent.appendChild(toolbar);
|
|
@@ -232,13 +257,13 @@ Viewer.prototype = {
|
|
|
232
257
|
}
|
|
233
258
|
|
|
234
259
|
if (this.options.get('toolbar_sticky') > -1) {
|
|
235
|
-
|
|
260
|
+
dom.utils.removeClass(toolbar, 'se-toolbar-sticky');
|
|
236
261
|
}
|
|
237
262
|
|
|
238
263
|
if (this.fullScreenSticky && !this.options.get('toolbar_container')) {
|
|
239
264
|
this.fullScreenSticky = false;
|
|
240
265
|
fc.get('_stickyDummy').style.display = 'block';
|
|
241
|
-
|
|
266
|
+
dom.utils.addClass(toolbar, 'se-toolbar-sticky');
|
|
242
267
|
}
|
|
243
268
|
|
|
244
269
|
this.editor.isInline = this.toolbar._isInline = this.fullScreenInline;
|
|
@@ -253,8 +278,8 @@ Viewer.prototype = {
|
|
|
253
278
|
|
|
254
279
|
const expansionIcon = this.icons.expansion;
|
|
255
280
|
this.editor.applyCommandTargets('fullScreen', (e) => {
|
|
256
|
-
|
|
257
|
-
|
|
281
|
+
dom.utils.changeElement(e.firstElementChild, expansionIcon);
|
|
282
|
+
dom.utils.removeClass(e, 'active');
|
|
258
283
|
});
|
|
259
284
|
}
|
|
260
285
|
|
|
@@ -265,8 +290,9 @@ Viewer.prototype = {
|
|
|
265
290
|
},
|
|
266
291
|
|
|
267
292
|
/**
|
|
293
|
+
* @this {ViewerThis}
|
|
268
294
|
* @description Add or remove the class name of "body" so that the code block is visible
|
|
269
|
-
* @param {boolean
|
|
295
|
+
* @param {boolean=} value true/false, If undefined toggle the codeView mode.
|
|
270
296
|
*/
|
|
271
297
|
showBlocks(value) {
|
|
272
298
|
const fc = this.editor.frameContext;
|
|
@@ -274,68 +300,94 @@ Viewer.prototype = {
|
|
|
274
300
|
fc.set('isShowBlocks', !!value);
|
|
275
301
|
|
|
276
302
|
if (value) {
|
|
277
|
-
|
|
278
|
-
|
|
303
|
+
dom.utils.addClass(fc.get('wysiwyg'), 'se-show-block');
|
|
304
|
+
dom.utils.addClass(this.editor.commandTargets.get('showBlocks'), 'active');
|
|
279
305
|
} else {
|
|
280
|
-
|
|
281
|
-
|
|
306
|
+
dom.utils.removeClass(fc.get('wysiwyg'), 'se-show-block');
|
|
307
|
+
dom.utils.removeClass(this.editor.commandTargets.get('showBlocks'), 'active');
|
|
282
308
|
}
|
|
283
309
|
|
|
284
310
|
this.editor._resourcesStateChange(fc);
|
|
285
311
|
},
|
|
286
312
|
|
|
313
|
+
/**
|
|
314
|
+
* @private
|
|
315
|
+
* @this {ViewerThis}
|
|
316
|
+
* @description Set the active class to the button of the toolbar
|
|
317
|
+
*/
|
|
287
318
|
_setButtonsActive() {
|
|
288
319
|
const fc = this.editor.frameContext;
|
|
289
320
|
|
|
290
321
|
// codeView
|
|
291
322
|
if (fc.get('isCodeView')) {
|
|
292
|
-
|
|
323
|
+
dom.utils.addClass(this.editor.commandTargets.get('codeView'), 'active');
|
|
293
324
|
} else {
|
|
294
|
-
|
|
325
|
+
dom.utils.removeClass(this.editor.commandTargets.get('codeView'), 'active');
|
|
295
326
|
}
|
|
296
327
|
|
|
297
328
|
// fullScreen
|
|
298
329
|
if (fc.get('isFullScreen')) {
|
|
299
330
|
const reductionIcon = this.icons.reduction;
|
|
300
331
|
this.editor.applyCommandTargets('fullScreen', (e) => {
|
|
301
|
-
|
|
302
|
-
|
|
332
|
+
dom.utils.changeElement(e.firstElementChild, reductionIcon);
|
|
333
|
+
dom.utils.addClass(e, 'active');
|
|
303
334
|
});
|
|
304
335
|
} else {
|
|
305
336
|
const expansionIcon = this.icons.expansion;
|
|
306
337
|
this.editor.applyCommandTargets('fullScreen', (e) => {
|
|
307
|
-
|
|
308
|
-
|
|
338
|
+
dom.utils.changeElement(e.firstElementChild, expansionIcon);
|
|
339
|
+
dom.utils.removeClass(e, 'active');
|
|
309
340
|
});
|
|
310
341
|
}
|
|
311
342
|
|
|
312
343
|
// showBlocks
|
|
313
344
|
if (fc.get('isShowBlocks')) {
|
|
314
|
-
|
|
345
|
+
dom.utils.addClass(this.editor.commandTargets.get('showBlocks'), 'active');
|
|
315
346
|
} else {
|
|
316
|
-
|
|
347
|
+
dom.utils.removeClass(this.editor.commandTargets.get('showBlocks'), 'active');
|
|
317
348
|
}
|
|
318
349
|
},
|
|
319
350
|
|
|
320
351
|
/**
|
|
352
|
+
* @this {ViewerThis}
|
|
321
353
|
* @description Prints the current content of the editor.
|
|
322
354
|
*/
|
|
323
355
|
print() {
|
|
324
|
-
|
|
356
|
+
/** @type {HTMLIFrameElement} */
|
|
357
|
+
const iframe = dom.utils.createElement('IFRAME', { style: 'display: none;' });
|
|
325
358
|
this._d.body.appendChild(iframe);
|
|
326
359
|
|
|
327
|
-
const
|
|
328
|
-
const
|
|
360
|
+
const innerPadding = this._w.getComputedStyle(this.editor.frameContext.get('wysiwyg')).padding;
|
|
361
|
+
const contentHTML = this.options.get('printTemplate') ? this.options.get('printTemplate').replace(/\{\{\s*contents\s*\}\}/i, this.html.get()) : this.html.get();
|
|
362
|
+
const printDocument = dom.query.getIframeDocument(iframe);
|
|
329
363
|
const wDoc = this.editor.frameContext.get('_wd');
|
|
364
|
+
const rtlClass = this.options.get('_rtl') ? ' se-rtl' : '';
|
|
365
|
+
const pageCSS = /*html*/ `
|
|
366
|
+
<style>
|
|
367
|
+
@page {
|
|
368
|
+
size: A4;
|
|
369
|
+
margin: ${innerPadding};
|
|
370
|
+
}
|
|
371
|
+
</style>`;
|
|
330
372
|
|
|
331
373
|
if (this.editor.frameOptions.get('iframe')) {
|
|
332
374
|
const arrts = this.options.get('printClass')
|
|
333
|
-
? 'class="' + this.options.get('printClass') + '"'
|
|
375
|
+
? 'class="' + this.options.get('printClass') + rtlClass + '"'
|
|
334
376
|
: this.editor.frameOptions.get('iframe_fullPage')
|
|
335
|
-
?
|
|
336
|
-
: 'class="' + this.options.get('_editableClass') + '"';
|
|
377
|
+
? dom.utils.getAttributesToString(wDoc.body, ['contenteditable'])
|
|
378
|
+
: 'class="' + this.options.get('_editableClass') + rtlClass + '"';
|
|
337
379
|
|
|
338
|
-
printDocument.write(
|
|
380
|
+
printDocument.write(/*html*/ `
|
|
381
|
+
<!DOCTYPE html>
|
|
382
|
+
<html>
|
|
383
|
+
<head>
|
|
384
|
+
${wDoc.head.innerHTML}
|
|
385
|
+
${pageCSS}
|
|
386
|
+
</head>
|
|
387
|
+
<body ${arrts} style="padding: 0; padding-left: 0; padding-top: 0; padding-right: 0; padding-bottom: 0;">
|
|
388
|
+
${contentHTML}
|
|
389
|
+
</body>
|
|
390
|
+
</html>`);
|
|
339
391
|
} else {
|
|
340
392
|
const links = this._d.head.getElementsByTagName('link');
|
|
341
393
|
const styles = this._d.head.getElementsByTagName('style');
|
|
@@ -347,23 +399,25 @@ Viewer.prototype = {
|
|
|
347
399
|
linkHTML += styles[i].outerHTML;
|
|
348
400
|
}
|
|
349
401
|
|
|
350
|
-
printDocument.write(/*html*/
|
|
402
|
+
printDocument.write(/*html*/ `
|
|
403
|
+
<!DOCTYPE html>
|
|
351
404
|
<html>
|
|
352
405
|
<head>
|
|
353
406
|
${linkHTML}
|
|
407
|
+
${pageCSS}
|
|
354
408
|
</head>
|
|
355
|
-
<body class="${this.options.get('printClass')
|
|
356
|
-
${contentHTML}
|
|
409
|
+
<body class="${(this.options.get('printClass') || this.options.get('_editableClass')) + rtlClass}" style="padding: 0; padding-left: 0; padding-top: 0; padding-right: 0; padding-bottom: 0;">
|
|
410
|
+
${contentHTML}
|
|
357
411
|
</body>
|
|
358
412
|
</html>`);
|
|
359
413
|
}
|
|
360
414
|
|
|
361
|
-
this.
|
|
415
|
+
this.ui.showLoading();
|
|
362
416
|
this._w.setTimeout(() => {
|
|
363
417
|
try {
|
|
364
418
|
iframe.focus();
|
|
365
419
|
// Edge, Chromium
|
|
366
|
-
if (env.isEdge || env.isChromium ||
|
|
420
|
+
if (env.isEdge || env.isChromium || 'StyleMedia' in env._w) {
|
|
367
421
|
try {
|
|
368
422
|
iframe.contentWindow.document.execCommand('print', false, null);
|
|
369
423
|
} catch (e) {
|
|
@@ -377,39 +431,40 @@ Viewer.prototype = {
|
|
|
377
431
|
} catch (error) {
|
|
378
432
|
throw Error(`[SUNEDITOR.print.fail] error: ${error.message}`);
|
|
379
433
|
} finally {
|
|
380
|
-
this.
|
|
381
|
-
|
|
434
|
+
this.ui.hideLoading();
|
|
435
|
+
dom.utils.removeItem(iframe);
|
|
382
436
|
}
|
|
383
437
|
}, 1000);
|
|
384
438
|
},
|
|
385
439
|
|
|
386
440
|
/**
|
|
441
|
+
* @this {ViewerThis}
|
|
387
442
|
* @description Open the preview window.
|
|
388
443
|
*/
|
|
389
444
|
preview() {
|
|
390
445
|
this.menu.dropdownOff();
|
|
391
446
|
this.menu.containerOff();
|
|
392
|
-
this.
|
|
393
|
-
this.
|
|
447
|
+
this.ui._offCurrentController();
|
|
448
|
+
this.ui._offCurrentModal();
|
|
394
449
|
|
|
395
|
-
const contentHTML = this.options.get('previewTemplate') ? this.options.get('previewTemplate').replace(/\{\{\s*contents\s*\}\}/i, this.html.get(true)) : this.html.get(true);
|
|
450
|
+
const contentHTML = this.options.get('previewTemplate') ? this.options.get('previewTemplate').replace(/\{\{\s*contents\s*\}\}/i, this.html.get({ withFrame: true })) : this.html.get({ withFrame: true });
|
|
396
451
|
const windowObject = this._w.open('', '_blank');
|
|
397
|
-
windowObject.mimeType = 'text/html';
|
|
398
452
|
const wDoc = this.editor.frameContext.get('_wd');
|
|
453
|
+
const rtlClass = this.options.get('_rtl') ? ' se-rtl' : '';
|
|
399
454
|
|
|
400
455
|
if (this.editor.frameOptions.get('iframe')) {
|
|
401
456
|
const arrts = this.options.get('printClass')
|
|
402
|
-
? 'class="' + this.options.get('printClass') + '"'
|
|
457
|
+
? 'class="' + this.options.get('printClass') + rtlClass + '"'
|
|
403
458
|
: this.editor.frameOptions.get('iframe_fullPage')
|
|
404
|
-
?
|
|
405
|
-
: 'class="' + this.options.get('_editableClass') + '"';
|
|
459
|
+
? dom.utils.getAttributesToString(wDoc.body, ['contenteditable'])
|
|
460
|
+
: 'class="' + this.options.get('_editableClass') + rtlClass + '"';
|
|
406
461
|
|
|
407
462
|
windowObject.document.write(/*html*/ `<!DOCTYPE html>
|
|
408
463
|
<html>
|
|
409
464
|
<head>
|
|
410
465
|
${wDoc.head.innerHTML}
|
|
411
466
|
<style>
|
|
412
|
-
body {overflow:auto !important;
|
|
467
|
+
body {overflow:auto !important; height:auto !important;}
|
|
413
468
|
</style>
|
|
414
469
|
</head>
|
|
415
470
|
<body ${arrts}>
|
|
@@ -435,13 +490,19 @@ Viewer.prototype = {
|
|
|
435
490
|
<title>${this.lang.preview}</title>
|
|
436
491
|
${linkHTML}
|
|
437
492
|
</head>
|
|
438
|
-
<body class="${this.options.get('printClass') ? this.options.get('printClass') : this.options.get('_editableClass')}" style="
|
|
493
|
+
<body class="${(this.options.get('printClass') ? this.options.get('printClass') : this.options.get('_editableClass')) + rtlClass}" style="height:auto">
|
|
439
494
|
${contentHTML}
|
|
440
495
|
</body>
|
|
441
496
|
</html>`);
|
|
442
497
|
}
|
|
443
498
|
},
|
|
444
499
|
|
|
500
|
+
/**
|
|
501
|
+
* @private
|
|
502
|
+
* @this {ViewerThis}
|
|
503
|
+
* @description Resets the full-screen height of the editor.
|
|
504
|
+
* - Updates the editor's height dynamically when in full-screen mode.
|
|
505
|
+
*/
|
|
445
506
|
_resetFullScreenHeight() {
|
|
446
507
|
if (this.editor.frameContext.get('isFullScreen')) {
|
|
447
508
|
this.fullScreenInnerHeight +=
|
|
@@ -452,12 +513,12 @@ Viewer.prototype = {
|
|
|
452
513
|
},
|
|
453
514
|
|
|
454
515
|
/**
|
|
516
|
+
* @private
|
|
517
|
+
* @this {ViewerThis}
|
|
455
518
|
* @description Run CodeMirror Editor
|
|
456
519
|
* @param {"set"|"get"|"readonly"|"refresh"} key method key
|
|
457
|
-
* @param {
|
|
520
|
+
* @param {*} value CodeMirror params
|
|
458
521
|
* @param {string|undefined} rootKey Root key
|
|
459
|
-
* @returns
|
|
460
|
-
* @private
|
|
461
522
|
*/
|
|
462
523
|
_codeMirrorEditor(key, value, rootKey) {
|
|
463
524
|
const fo = rootKey ? this.frameRoots.get(rootKey).get('options') : this.editor.frameOptions;
|
|
@@ -495,9 +556,10 @@ Viewer.prototype = {
|
|
|
495
556
|
},
|
|
496
557
|
|
|
497
558
|
/**
|
|
559
|
+
* @private
|
|
560
|
+
* @this {ViewerThis}
|
|
498
561
|
* @description Set method in the code view area
|
|
499
562
|
* @param {string} value HTML string
|
|
500
|
-
* @private
|
|
501
563
|
*/
|
|
502
564
|
_setCodeView(value) {
|
|
503
565
|
if (this.options.get('hasCodeMirror')) {
|
|
@@ -508,8 +570,9 @@ Viewer.prototype = {
|
|
|
508
570
|
},
|
|
509
571
|
|
|
510
572
|
/**
|
|
511
|
-
* @description Get method in the code view area
|
|
512
573
|
* @private
|
|
574
|
+
* @this {ViewerThis}
|
|
575
|
+
* @description Get method in the code view area
|
|
513
576
|
*/
|
|
514
577
|
_getCodeView() {
|
|
515
578
|
if (this.options.get('hasCodeMirror')) {
|
|
@@ -520,8 +583,9 @@ Viewer.prototype = {
|
|
|
520
583
|
},
|
|
521
584
|
|
|
522
585
|
/**
|
|
523
|
-
* @description Convert the data of the code view and put it in the WYSIWYG area.
|
|
524
586
|
* @private
|
|
587
|
+
* @this {ViewerThis}
|
|
588
|
+
* @description Convert the data of the code view and put it in the WYSIWYG area.
|
|
525
589
|
*/
|
|
526
590
|
_setCodeDataToEditor() {
|
|
527
591
|
const code_html = this._getCodeView();
|
|
@@ -547,34 +611,38 @@ Viewer.prototype = {
|
|
|
547
611
|
}
|
|
548
612
|
|
|
549
613
|
wDoc.head.innerHTML = headers;
|
|
550
|
-
wDoc.body.innerHTML = this.html.clean(parseDocument.body.innerHTML, true, null, null);
|
|
614
|
+
wDoc.body.innerHTML = this.html.clean(parseDocument.body.innerHTML, { forceFormat: true, whitelist: null, blacklist: null, _freeCodeViewMode: this.options.get('freeCodeViewMode') });
|
|
551
615
|
|
|
552
616
|
const attrs = parseDocument.body.attributes;
|
|
553
617
|
for (let i = 0, len = attrs.length; i < len; i++) {
|
|
554
618
|
if (attrs[i].name === 'contenteditable') continue;
|
|
555
619
|
wDoc.body.setAttribute(attrs[i].name, attrs[i].value);
|
|
556
620
|
}
|
|
557
|
-
if (!
|
|
621
|
+
if (!dom.utils.hasClass(wDoc.body, 'sun-editor-editable')) {
|
|
558
622
|
const editableClasses = this.options.get('_editableClass').split(' ');
|
|
559
623
|
for (let i = 0; i < editableClasses.length; i++) {
|
|
560
|
-
|
|
624
|
+
dom.utils.addClass(wDoc.body, this.options.get('_editableClass')[i]);
|
|
561
625
|
}
|
|
562
626
|
}
|
|
563
627
|
} else {
|
|
564
|
-
this.editor.frameContext.get('wysiwyg').innerHTML =
|
|
628
|
+
this.editor.frameContext.get('wysiwyg').innerHTML =
|
|
629
|
+
code_html.length > 0
|
|
630
|
+
? this.html.clean(code_html, { forceFormat: true, whitelist: null, blacklist: null, _freeCodeViewMode: this.options.get('freeCodeViewMode') })
|
|
631
|
+
: '<' + this.options.get('defaultLine') + '><br></' + this.options.get('defaultLine') + '>';
|
|
565
632
|
}
|
|
566
633
|
},
|
|
567
634
|
|
|
568
635
|
/**
|
|
569
|
-
* @description Convert the data of the WYSIWYG area and put it in the code view area.
|
|
570
636
|
* @private
|
|
637
|
+
* @this {ViewerThis}
|
|
638
|
+
* @description Convert the data of the WYSIWYG area and put it in the code view area.
|
|
571
639
|
*/
|
|
572
640
|
_setEditorDataToCodeView() {
|
|
573
641
|
const codeContent = this.html._convertToCode(this.editor.frameContext.get('wysiwyg'), false);
|
|
574
642
|
let codeValue = '';
|
|
575
643
|
|
|
576
644
|
if (this.editor.frameOptions.get('iframe_fullPage')) {
|
|
577
|
-
const attrs =
|
|
645
|
+
const attrs = dom.utils.getAttributesToString(this.editor.frameContext.get('_wd').body, null);
|
|
578
646
|
codeValue = '<!DOCTYPE html>\n<html>\n' + this.editor.frameContext.get('_wd').head.outerHTML.replace(/>(?!\n)/g, '>\n') + '<body ' + attrs + '>\n' + codeContent + '</body>\n</html>';
|
|
579
647
|
} else {
|
|
580
648
|
codeValue = codeContent;
|
|
@@ -583,11 +651,28 @@ Viewer.prototype = {
|
|
|
583
651
|
this._setCodeView(codeValue);
|
|
584
652
|
},
|
|
585
653
|
|
|
654
|
+
/**
|
|
655
|
+
* @private
|
|
656
|
+
* @this {ViewerThis}
|
|
657
|
+
* @description Adjusts the height of the code view area.
|
|
658
|
+
* - Ensures the code block auto-resizes based on its content.
|
|
659
|
+
* @param {HTMLElement} code - Code area
|
|
660
|
+
* @param {HTMLTextAreaElement} codeNumbers - Code numbers area
|
|
661
|
+
* @param {boolean} isAuto - Auto height option
|
|
662
|
+
*/
|
|
586
663
|
_codeViewAutoHeight(code, codeNumbers, isAuto) {
|
|
587
664
|
if (isAuto) code.style.height = code.scrollHeight + 'px';
|
|
588
665
|
this._updateLineNumbers(codeNumbers, code);
|
|
589
666
|
},
|
|
590
667
|
|
|
668
|
+
/**
|
|
669
|
+
* @private
|
|
670
|
+
* @this {ViewerThis}
|
|
671
|
+
* @description Updates the line numbers for the code editor.
|
|
672
|
+
* - Dynamically adjusts line numbers as content grows.
|
|
673
|
+
* @param {HTMLTextAreaElement} lineNumbers - Code numbers area
|
|
674
|
+
* @param {HTMLElement} code - Code area
|
|
675
|
+
*/
|
|
591
676
|
_updateLineNumbers(lineNumbers, code) {
|
|
592
677
|
if (!lineNumbers) return;
|
|
593
678
|
|
|
@@ -604,6 +689,13 @@ Viewer.prototype = {
|
|
|
604
689
|
}
|
|
605
690
|
},
|
|
606
691
|
|
|
692
|
+
/**
|
|
693
|
+
* @private
|
|
694
|
+
* @this {HTMLElement} Code numbers area
|
|
695
|
+
* @description Synchronizes scrolling of line numbers with the code editor.
|
|
696
|
+
* - Keeps the line numbers aligned with the text.
|
|
697
|
+
* @param {HTMLTextAreaElement} codeNumbers - Code numbers textarea
|
|
698
|
+
*/
|
|
607
699
|
_scrollLineNumbers(codeNumbers) {
|
|
608
700
|
codeNumbers.scrollTop = this.scrollTop;
|
|
609
701
|
codeNumbers.scrollLeft = this.scrollLeft;
|
|
@@ -612,6 +704,11 @@ Viewer.prototype = {
|
|
|
612
704
|
constructor: Viewer
|
|
613
705
|
};
|
|
614
706
|
|
|
707
|
+
/**
|
|
708
|
+
* @private
|
|
709
|
+
* @description Create line numbers for the code view area
|
|
710
|
+
* @param {__se__FrameContext} fc - Frame context
|
|
711
|
+
*/
|
|
615
712
|
function CreateLineNumbers(fc) {
|
|
616
713
|
const codeNumbers = fc.get('codeNumbers');
|
|
617
714
|
if (!codeNumbers) return;
|
|
@@ -630,17 +727,24 @@ function CreateLineNumbers(fc) {
|
|
|
630
727
|
codeNumbers.style.margin = margin || '';
|
|
631
728
|
}
|
|
632
729
|
|
|
730
|
+
/**
|
|
731
|
+
* @private
|
|
732
|
+
* @description Get the line height of the textarea
|
|
733
|
+
* @param {HTMLTextAreaElement} textarea Textarea element
|
|
734
|
+
* @returns {number}
|
|
735
|
+
*/
|
|
633
736
|
function GetLineHeight(textarea) {
|
|
634
|
-
|
|
737
|
+
const lineHeight = env._w.getComputedStyle(textarea).lineHeight;
|
|
738
|
+
let lineHeightMatch;
|
|
635
739
|
|
|
636
740
|
if (!numbers.is(lineHeight)) {
|
|
637
741
|
const fontSize = env._w.getComputedStyle(textarea).fontSize;
|
|
638
|
-
|
|
742
|
+
lineHeightMatch = numbers.get(fontSize) * 1.2;
|
|
639
743
|
} else {
|
|
640
|
-
|
|
744
|
+
lineHeightMatch = numbers.get(lineHeight);
|
|
641
745
|
}
|
|
642
746
|
|
|
643
|
-
return
|
|
747
|
+
return lineHeightMatch;
|
|
644
748
|
}
|
|
645
749
|
|
|
646
750
|
export default Viewer;
|