suneditor 3.0.0-beta.9 → 3.0.0-rc.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/README.md +65 -57
- package/dist/suneditor-contents.min.css +1 -0
- package/dist/suneditor.min.css +1 -1
- package/dist/suneditor.min.js +1 -1
- package/package.json +110 -61
- package/src/assets/design/color.css +36 -17
- package/src/assets/design/size.css +2 -0
- package/src/assets/icons/defaultIcons.js +17 -2
- package/src/assets/suneditor-contents.css +51 -16
- package/src/assets/suneditor.css +116 -43
- package/src/core/config/contextProvider.js +288 -0
- package/src/core/config/eventManager.js +188 -0
- package/src/core/config/instanceCheck.js +59 -0
- package/src/core/config/optionProvider.js +452 -0
- package/src/core/editor.js +166 -1637
- package/src/core/event/actions/index.js +229 -0
- package/src/core/event/effects/common.registry.js +74 -0
- package/src/core/event/effects/keydown.registry.js +573 -0
- package/src/core/event/effects/ruleHelpers.js +148 -0
- package/src/core/event/eventOrchestrator.js +944 -0
- package/src/core/event/executor.js +27 -0
- package/src/core/{base/eventHandlers → event/handlers}/handler_toolbar.js +27 -28
- package/src/core/{base/eventHandlers → event/handlers}/handler_ww_clipboard.js +10 -8
- package/src/core/{base/eventHandlers → event/handlers}/handler_ww_dragDrop.js +22 -23
- package/src/core/event/handlers/handler_ww_input.js +75 -0
- package/src/core/event/handlers/handler_ww_key.js +228 -0
- package/src/core/event/handlers/handler_ww_mouse.js +166 -0
- package/src/core/event/ports.js +211 -0
- package/src/core/event/reducers/keydown.reducer.js +97 -0
- package/src/core/event/rules/keydown.rule.arrow.js +63 -0
- package/src/core/event/rules/keydown.rule.backspace.js +208 -0
- package/src/core/event/rules/keydown.rule.delete.js +132 -0
- package/src/core/event/rules/keydown.rule.enter.js +150 -0
- package/src/core/event/rules/keydown.rule.tab.js +35 -0
- package/src/core/event/support/defaultLineManager.js +136 -0
- package/src/core/event/support/selectionState.js +204 -0
- package/src/core/kernel/coreKernel.js +320 -0
- package/src/core/kernel/kernelInjector.js +19 -0
- package/src/core/kernel/store.js +173 -0
- package/src/core/{class → logic/dom}/char.js +42 -45
- package/src/core/logic/dom/format.js +1075 -0
- package/src/core/{class → logic/dom}/html.js +743 -624
- package/src/core/logic/dom/inline.js +1847 -0
- package/src/core/logic/dom/listFormat.js +601 -0
- package/src/core/{class → logic/dom}/nodeTransform.js +92 -72
- package/src/core/{class → logic/dom}/offset.js +254 -317
- package/src/core/logic/dom/selection.js +754 -0
- package/src/core/logic/panel/menu.js +389 -0
- package/src/core/logic/panel/toolbar.js +449 -0
- package/src/core/logic/panel/viewer.js +761 -0
- package/src/core/logic/shell/_commandExecutor.js +380 -0
- package/src/core/logic/shell/commandDispatcher.js +241 -0
- package/src/core/logic/shell/component.js +970 -0
- package/src/core/logic/shell/focusManager.js +110 -0
- package/src/core/{base → logic/shell}/history.js +110 -60
- package/src/core/logic/shell/pluginManager.js +363 -0
- package/src/core/logic/shell/shortcuts.js +130 -0
- package/src/core/logic/shell/ui.js +904 -0
- package/src/core/schema/context.js +66 -0
- package/src/core/schema/frameContext.js +160 -0
- package/src/core/schema/options.js +628 -0
- package/src/core/section/constructor.js +194 -500
- package/src/core/section/documentType.js +297 -222
- package/src/events.js +808 -543
- package/src/helper/clipboard.js +27 -16
- package/src/helper/converter.js +100 -78
- package/src/helper/dom/domCheck.js +56 -30
- package/src/helper/dom/domQuery.js +159 -89
- package/src/helper/dom/domUtils.js +114 -49
- package/src/helper/dom/index.js +5 -1
- package/src/helper/env.js +26 -26
- package/src/helper/index.js +1 -1
- package/src/helper/keyCodeMap.js +25 -28
- package/src/helper/numbers.js +4 -8
- package/src/helper/unicode.js +4 -8
- package/src/hooks/base.js +307 -0
- package/src/hooks/params.js +130 -0
- package/src/interfaces/contracts.js +227 -0
- package/src/interfaces/index.js +7 -0
- package/src/interfaces/plugins.js +239 -0
- package/src/langs/ckb.js +4 -4
- package/src/langs/cs.js +4 -4
- package/src/langs/da.js +4 -4
- package/src/langs/de.js +4 -4
- package/src/langs/en.js +4 -4
- package/src/langs/es.js +4 -4
- package/src/langs/fa.js +4 -4
- package/src/langs/fr.js +4 -4
- package/src/langs/he.js +4 -4
- package/src/langs/hu.js +4 -4
- package/src/langs/it.js +4 -4
- package/src/langs/ja.js +4 -4
- package/src/langs/km.js +4 -4
- package/src/langs/ko.js +4 -4
- package/src/langs/lv.js +4 -4
- package/src/langs/nl.js +4 -4
- package/src/langs/pl.js +4 -4
- package/src/langs/pt_br.js +13 -13
- package/src/langs/ro.js +4 -4
- package/src/langs/ru.js +4 -4
- package/src/langs/se.js +4 -4
- package/src/langs/tr.js +4 -4
- package/src/langs/uk.js +4 -4
- package/src/langs/ur.js +4 -4
- package/src/langs/zh_cn.js +4 -4
- package/src/modules/{Browser.js → contract/Browser.js} +119 -128
- package/src/modules/{ColorPicker.js → contract/ColorPicker.js} +132 -142
- package/src/modules/contract/Controller.js +589 -0
- package/src/modules/{Figure.js → contract/Figure.js} +591 -411
- package/src/modules/{HueSlider.js → contract/HueSlider.js} +125 -86
- package/src/modules/contract/Modal.js +357 -0
- package/src/modules/contract/index.js +9 -0
- package/src/modules/manager/ApiManager.js +197 -0
- package/src/modules/{FileManager.js → manager/FileManager.js} +128 -160
- package/src/modules/manager/index.js +5 -0
- package/src/modules/{ModalAnchorEditor.js → ui/ModalAnchorEditor.js} +108 -138
- package/src/modules/{SelectMenu.js → ui/SelectMenu.js} +119 -120
- package/src/modules/{_DragHandle.js → ui/_DragHandle.js} +1 -1
- package/src/modules/ui/index.js +6 -0
- package/src/plugins/browser/audioGallery.js +23 -26
- package/src/plugins/browser/fileBrowser.js +25 -28
- package/src/plugins/browser/fileGallery.js +20 -23
- package/src/plugins/browser/imageGallery.js +24 -23
- package/src/plugins/browser/videoGallery.js +27 -29
- package/src/plugins/command/blockquote.js +11 -17
- package/src/plugins/command/exportPDF.js +26 -26
- package/src/plugins/command/fileUpload.js +138 -133
- package/src/plugins/command/list_bulleted.js +48 -44
- package/src/plugins/command/list_numbered.js +48 -44
- package/src/plugins/dropdown/align.js +64 -50
- package/src/plugins/dropdown/backgroundColor.js +34 -35
- package/src/plugins/dropdown/{formatBlock.js → blockStyle.js} +43 -37
- package/src/plugins/dropdown/font.js +50 -36
- package/src/plugins/dropdown/fontColor.js +34 -35
- package/src/plugins/dropdown/hr.js +55 -50
- package/src/plugins/dropdown/layout.js +20 -15
- package/src/plugins/dropdown/lineHeight.js +46 -30
- package/src/plugins/dropdown/list.js +32 -33
- package/src/plugins/dropdown/paragraphStyle.js +40 -34
- package/src/plugins/dropdown/table/index.js +915 -0
- package/src/plugins/dropdown/table/render/table.html.js +308 -0
- package/src/plugins/dropdown/table/render/table.menu.js +121 -0
- package/src/plugins/dropdown/table/services/table.cell.js +465 -0
- package/src/plugins/dropdown/table/services/table.clipboard.js +414 -0
- package/src/plugins/dropdown/table/services/table.grid.js +504 -0
- package/src/plugins/dropdown/table/services/table.resize.js +463 -0
- package/src/plugins/dropdown/table/services/table.selection.js +466 -0
- package/src/plugins/dropdown/table/services/table.style.js +844 -0
- package/src/plugins/dropdown/table/shared/table.constants.js +109 -0
- package/src/plugins/dropdown/table/shared/table.utils.js +219 -0
- package/src/plugins/dropdown/template.js +20 -15
- package/src/plugins/dropdown/textStyle.js +28 -22
- package/src/plugins/field/mention.js +54 -49
- package/src/plugins/index.js +5 -5
- package/src/plugins/input/fontSize.js +100 -97
- package/src/plugins/input/pageNavigator.js +13 -10
- package/src/plugins/modal/audio.js +208 -219
- package/src/plugins/modal/drawing.js +99 -104
- package/src/plugins/modal/embed.js +323 -312
- package/src/plugins/modal/image/index.js +942 -0
- package/src/plugins/modal/image/render/image.html.js +150 -0
- package/src/plugins/modal/image/services/image.size.js +198 -0
- package/src/plugins/modal/image/services/image.upload.js +216 -0
- package/src/plugins/modal/image/shared/image.constants.js +20 -0
- package/src/plugins/modal/link.js +74 -54
- package/src/plugins/modal/math.js +126 -119
- package/src/plugins/modal/video/index.js +858 -0
- package/src/plugins/modal/video/render/video.html.js +131 -0
- package/src/plugins/modal/video/services/video.size.js +281 -0
- package/src/plugins/modal/video/services/video.upload.js +92 -0
- package/src/plugins/popup/anchor.js +57 -49
- package/src/suneditor.js +73 -61
- package/src/themes/cobalt.css +155 -0
- package/src/themes/dark.css +143 -120
- package/src/typedef.js +214 -63
- package/types/assets/icons/defaultIcons.d.ts +8 -0
- package/types/assets/suneditor-contents.css.d.ts +1 -0
- package/types/assets/suneditor.css.d.ts +1 -0
- package/types/core/config/contextProvider.d.ts +148 -0
- package/types/core/config/eventManager.d.ts +68 -0
- package/types/core/config/instanceCheck.d.ts +33 -0
- package/types/core/config/optionProvider.d.ts +147 -0
- package/types/core/editor.d.ts +27 -586
- package/types/core/event/actions/index.d.ts +50 -0
- package/types/core/event/effects/common.registry.d.ts +56 -0
- package/types/core/event/effects/keydown.registry.d.ts +80 -0
- package/types/core/event/effects/ruleHelpers.d.ts +36 -0
- package/types/core/event/eventOrchestrator.d.ts +191 -0
- package/types/core/event/executor.d.ts +13 -0
- package/types/core/event/handlers/handler_toolbar.d.ts +38 -0
- package/types/core/event/handlers/handler_ww_clipboard.d.ts +36 -0
- package/types/core/event/handlers/handler_ww_dragDrop.d.ts +26 -0
- package/types/core/event/handlers/handler_ww_input.d.ts +38 -0
- package/types/core/event/handlers/handler_ww_key.d.ts +40 -0
- package/types/core/event/handlers/handler_ww_mouse.d.ts +47 -0
- package/types/core/event/ports.d.ts +256 -0
- package/types/core/event/reducers/keydown.reducer.d.ts +84 -0
- package/types/core/event/rules/keydown.rule.arrow.d.ts +19 -0
- package/types/core/event/rules/keydown.rule.backspace.d.ts +18 -0
- package/types/core/event/rules/keydown.rule.delete.d.ts +18 -0
- package/types/core/event/rules/keydown.rule.enter.d.ts +18 -0
- package/types/core/event/rules/keydown.rule.tab.d.ts +18 -0
- package/types/core/event/support/defaultLineManager.d.ts +22 -0
- package/types/core/event/support/selectionState.d.ts +29 -0
- package/types/core/kernel/coreKernel.d.ts +219 -0
- package/types/core/kernel/kernelInjector.d.ts +16 -0
- package/types/core/kernel/store.d.ts +170 -0
- package/types/core/logic/dom/char.d.ts +46 -0
- package/types/core/logic/dom/format.d.ts +234 -0
- package/types/core/logic/dom/html.d.ts +290 -0
- package/types/core/logic/dom/inline.d.ts +93 -0
- package/types/core/logic/dom/listFormat.d.ts +101 -0
- package/types/core/logic/dom/nodeTransform.d.ts +110 -0
- package/types/core/logic/dom/offset.d.ts +335 -0
- package/types/core/logic/dom/selection.d.ts +165 -0
- package/types/core/logic/panel/menu.d.ts +93 -0
- package/types/core/logic/panel/toolbar.d.ts +128 -0
- package/types/core/logic/panel/viewer.d.ts +89 -0
- package/types/core/logic/shell/_commandExecutor.d.ts +18 -0
- package/types/core/logic/shell/commandDispatcher.d.ts +65 -0
- package/types/core/logic/shell/component.d.ts +182 -0
- package/types/core/logic/shell/focusManager.d.ts +31 -0
- package/types/core/{base → logic/shell}/history.d.ts +13 -12
- package/types/core/logic/shell/pluginManager.d.ts +115 -0
- package/types/core/logic/shell/shortcuts.d.ts +131 -0
- package/types/core/logic/shell/ui.d.ts +261 -0
- package/types/core/schema/context.d.ts +104 -0
- package/types/core/schema/frameContext.d.ts +320 -0
- package/types/core/schema/options.d.ts +1241 -0
- package/types/core/section/constructor.d.ts +117 -652
- package/types/core/section/documentType.d.ts +43 -61
- package/types/events.d.ts +796 -65
- package/types/helper/clipboard.d.ts +5 -4
- package/types/helper/converter.d.ts +55 -43
- package/types/helper/dom/domCheck.d.ts +27 -19
- package/types/helper/dom/domQuery.d.ts +76 -57
- package/types/helper/dom/domUtils.d.ts +62 -39
- package/types/helper/dom/index.d.ts +87 -1
- package/types/helper/env.d.ts +16 -13
- package/types/helper/index.d.ts +8 -2
- package/types/helper/keyCodeMap.d.ts +24 -23
- package/types/helper/numbers.d.ts +4 -6
- package/types/helper/unicode.d.ts +4 -3
- package/types/hooks/base.d.ts +239 -0
- package/types/hooks/params.d.ts +65 -0
- package/types/index.d.ts +20 -117
- package/types/interfaces/contracts.d.ts +183 -0
- package/types/interfaces/index.d.ts +3 -0
- package/types/interfaces/plugins.d.ts +168 -0
- package/types/langs/_Lang.d.ts +2 -2
- package/types/langs/index.d.ts +2 -2
- package/types/modules/contract/Browser.d.ts +262 -0
- package/types/modules/contract/ColorPicker.d.ts +99 -0
- package/types/modules/contract/Controller.d.ts +204 -0
- package/types/modules/contract/Figure.d.ts +529 -0
- package/types/modules/{HueSlider.d.ts → contract/HueSlider.d.ts} +39 -28
- package/types/modules/contract/Modal.d.ts +62 -0
- package/types/modules/contract/index.d.ts +7 -0
- package/types/modules/manager/ApiManager.d.ts +106 -0
- package/types/modules/manager/FileManager.d.ts +124 -0
- package/types/modules/manager/index.d.ts +3 -0
- package/types/modules/ui/ModalAnchorEditor.d.ts +152 -0
- package/types/modules/ui/SelectMenu.d.ts +107 -0
- package/types/modules/{_DragHandle.d.ts → ui/_DragHandle.d.ts} +1 -0
- package/types/modules/ui/index.d.ts +4 -0
- package/types/plugins/browser/audioGallery.d.ts +33 -41
- package/types/plugins/browser/fileBrowser.d.ts +42 -50
- package/types/plugins/browser/fileGallery.d.ts +33 -41
- package/types/plugins/browser/imageGallery.d.ts +30 -37
- package/types/plugins/browser/videoGallery.d.ts +33 -41
- package/types/plugins/command/blockquote.d.ts +4 -21
- package/types/plugins/command/exportPDF.d.ts +23 -33
- package/types/plugins/command/fileUpload.d.ts +80 -100
- package/types/plugins/command/list_bulleted.d.ts +9 -35
- package/types/plugins/command/list_numbered.d.ts +9 -35
- package/types/plugins/dropdown/align.d.ts +23 -46
- package/types/plugins/dropdown/backgroundColor.d.ts +35 -53
- package/types/plugins/dropdown/blockStyle.d.ts +45 -0
- package/types/plugins/dropdown/font.d.ts +18 -41
- package/types/plugins/dropdown/fontColor.d.ts +35 -53
- package/types/plugins/dropdown/hr.d.ts +26 -52
- package/types/plugins/dropdown/layout.d.ts +19 -25
- package/types/plugins/dropdown/lineHeight.d.ts +21 -39
- package/types/plugins/dropdown/list.d.ts +6 -34
- package/types/plugins/dropdown/paragraphStyle.d.ts +34 -45
- package/types/plugins/dropdown/table/index.d.ts +158 -0
- package/types/plugins/dropdown/table/render/table.html.d.ts +71 -0
- package/types/plugins/dropdown/table/render/table.menu.d.ts +59 -0
- package/types/plugins/dropdown/table/services/table.cell.d.ts +76 -0
- package/types/plugins/dropdown/table/services/table.clipboard.d.ts +26 -0
- package/types/plugins/dropdown/table/services/table.grid.d.ts +77 -0
- package/types/plugins/dropdown/table/services/table.resize.d.ts +72 -0
- package/types/plugins/dropdown/table/services/table.selection.d.ts +59 -0
- package/types/plugins/dropdown/table/services/table.style.d.ts +162 -0
- package/types/plugins/dropdown/table/shared/table.constants.d.ts +134 -0
- package/types/plugins/dropdown/table/shared/table.utils.d.ts +91 -0
- package/types/plugins/dropdown/template.d.ts +19 -25
- package/types/plugins/dropdown/textStyle.d.ts +23 -30
- package/types/plugins/field/mention.d.ts +66 -72
- package/types/plugins/index.d.ts +41 -40
- package/types/plugins/input/fontSize.d.ts +57 -96
- package/types/plugins/input/pageNavigator.d.ts +5 -8
- package/types/plugins/modal/audio.d.ts +60 -153
- package/types/plugins/modal/drawing.d.ts +16 -118
- package/types/plugins/modal/embed.d.ts +46 -166
- package/types/plugins/modal/image/index.d.ts +281 -0
- package/types/plugins/modal/image/render/image.html.d.ts +45 -0
- package/types/plugins/modal/image/services/image.size.d.ts +55 -0
- package/types/plugins/modal/image/services/image.upload.d.ts +24 -0
- package/types/plugins/modal/image/shared/image.constants.d.ts +17 -0
- package/types/plugins/modal/link.d.ts +46 -66
- package/types/plugins/modal/math.d.ts +17 -86
- package/types/plugins/modal/{video.d.ts → video/index.d.ts} +89 -221
- package/types/plugins/modal/video/render/video.html.d.ts +37 -0
- package/types/plugins/modal/video/services/video.size.d.ts +74 -0
- package/types/plugins/modal/video/services/video.upload.d.ts +19 -0
- package/types/plugins/popup/anchor.d.ts +8 -38
- package/types/suneditor.d.ts +55 -24
- package/types/typedef.d.ts +344 -228
- package/CONTRIBUTING.md +0 -186
- package/src/core/base/eventHandlers/handler_ww_key_input.js +0 -1200
- package/src/core/base/eventHandlers/handler_ww_mouse.js +0 -194
- package/src/core/base/eventManager.js +0 -1523
- package/src/core/class/component.js +0 -856
- package/src/core/class/format.js +0 -3433
- package/src/core/class/menu.js +0 -346
- package/src/core/class/selection.js +0 -610
- package/src/core/class/shortcuts.js +0 -98
- package/src/core/class/toolbar.js +0 -431
- package/src/core/class/ui.js +0 -424
- package/src/core/class/viewer.js +0 -750
- package/src/core/section/actives.js +0 -266
- package/src/core/section/context.js +0 -102
- package/src/editorInjector/_classes.js +0 -36
- package/src/editorInjector/_core.js +0 -87
- package/src/editorInjector/index.js +0 -73
- package/src/modules/ApiManager.js +0 -191
- package/src/modules/Controller.js +0 -474
- package/src/modules/Modal.js +0 -346
- package/src/modules/index.js +0 -14
- package/src/plugins/dropdown/table.js +0 -4034
- package/src/plugins/modal/image.js +0 -1376
- package/src/plugins/modal/video.js +0 -1226
- package/types/core/base/eventHandlers/handler_toolbar.d.ts +0 -41
- package/types/core/base/eventHandlers/handler_ww_clipboard.d.ts +0 -40
- package/types/core/base/eventHandlers/handler_ww_dragDrop.d.ts +0 -35
- package/types/core/base/eventHandlers/handler_ww_key_input.d.ts +0 -45
- package/types/core/base/eventHandlers/handler_ww_mouse.d.ts +0 -39
- package/types/core/base/eventManager.d.ts +0 -401
- package/types/core/class/char.d.ts +0 -61
- package/types/core/class/component.d.ts +0 -213
- package/types/core/class/format.d.ts +0 -623
- package/types/core/class/html.d.ts +0 -430
- package/types/core/class/menu.d.ts +0 -126
- package/types/core/class/nodeTransform.d.ts +0 -93
- package/types/core/class/offset.d.ts +0 -522
- package/types/core/class/selection.d.ts +0 -188
- package/types/core/class/shortcuts.d.ts +0 -142
- package/types/core/class/toolbar.d.ts +0 -189
- package/types/core/class/ui.d.ts +0 -164
- package/types/core/class/viewer.d.ts +0 -140
- package/types/core/section/actives.d.ts +0 -46
- package/types/core/section/context.d.ts +0 -45
- package/types/editorInjector/_classes.d.ts +0 -41
- package/types/editorInjector/_core.d.ts +0 -87
- package/types/editorInjector/index.d.ts +0 -69
- package/types/modules/ApiManager.d.ts +0 -125
- package/types/modules/Browser.d.ts +0 -326
- package/types/modules/ColorPicker.d.ts +0 -135
- package/types/modules/Controller.d.ts +0 -251
- package/types/modules/Figure.d.ts +0 -517
- package/types/modules/FileManager.d.ts +0 -202
- package/types/modules/Modal.d.ts +0 -111
- package/types/modules/ModalAnchorEditor.d.ts +0 -236
- package/types/modules/SelectMenu.d.ts +0 -194
- package/types/modules/index.d.ts +0 -26
- package/types/plugins/dropdown/formatBlock.d.ts +0 -55
- package/types/plugins/dropdown/table.d.ts +0 -627
- package/types/plugins/modal/image.d.ts +0 -451
- /package/{LICENSE → LICENSE.txt} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Modal } from '../../modules';
|
|
1
|
+
import { PluginModal } from '../../interfaces';
|
|
2
|
+
import { Modal } from '../../modules/contract';
|
|
3
3
|
import { dom, env } from '../../helper';
|
|
4
4
|
|
|
5
|
-
const { _w
|
|
5
|
+
const { _w } = env;
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @typedef {Object} DrawingPluginOptions
|
|
9
|
-
* @property {string} [outputFormat="dataurl"] - The output format of the drawing. Options: "dataurl"
|
|
10
|
-
* @property {boolean} [useFormatType=false] - Whether to enable format type selection (block vs inline).
|
|
11
|
-
* @property {string} [defaultFormatType="block"] - The default format type, either "block" or "inline"
|
|
9
|
+
* @property {string} [outputFormat="dataurl"] - The output format of the drawing. Options: `"dataurl"`, `"svg"`.
|
|
10
|
+
* @property {boolean} [useFormatType=false] - Whether to enable format type selection (`block` vs `inline`).
|
|
11
|
+
* @property {string} [defaultFormatType="block"] - The default format type, either `"block"` or `"inline"`.
|
|
12
12
|
* @property {boolean} [keepFormatType=false] - Whether to maintain the chosen format type after drawing.
|
|
13
13
|
* @property {number} [lineWidth=5] - The width of the drawing line.
|
|
14
14
|
* @property {boolean} [lineReconnect=false] - Whether to reconnect lines when drawing.
|
|
15
|
-
* @property {CanvasLineCap} [lineCap="round"] - The style of the line cap ("butt"
|
|
15
|
+
* @property {CanvasLineCap} [lineCap="round"] - The style of the line cap (`"butt"`, `"round"`, or `"square"`).
|
|
16
16
|
* @property {string} [lineColor=""] - The color of the drawing line.
|
|
17
17
|
* @property {boolean} [canResize=true] - Whether the modal form can be resized.
|
|
18
18
|
* @property {boolean} [maintainRatio=true] - Whether to maintain the aspect ratio when resizing.
|
|
@@ -29,20 +29,22 @@ const { _w, isMobile } = env;
|
|
|
29
29
|
* @class
|
|
30
30
|
* @description Drawing modal plugin.
|
|
31
31
|
*/
|
|
32
|
-
class Drawing extends
|
|
32
|
+
class Drawing extends PluginModal {
|
|
33
33
|
static key = 'drawing';
|
|
34
|
-
static type = 'modal';
|
|
35
34
|
static className = '';
|
|
36
35
|
|
|
36
|
+
#events;
|
|
37
|
+
#eventsRegister;
|
|
38
|
+
|
|
37
39
|
/**
|
|
38
40
|
* @constructor
|
|
39
|
-
* @param {
|
|
41
|
+
* @param {SunEditor.Kernel} editor - The core kernel
|
|
40
42
|
* @param {DrawingPluginOptions} pluginOptions
|
|
41
43
|
*/
|
|
42
44
|
constructor(editor, pluginOptions) {
|
|
43
45
|
// plugin basic properties
|
|
44
46
|
super(editor);
|
|
45
|
-
this.title = this
|
|
47
|
+
this.title = this.$.lang.drawing;
|
|
46
48
|
this.icon = 'drawing';
|
|
47
49
|
this.pluginOptions = {
|
|
48
50
|
outputFormat: pluginOptions.outputFormat || 'dataurl', // dataurl, svg
|
|
@@ -60,31 +62,31 @@ class Drawing extends EditorInjector {
|
|
|
60
62
|
maxHeight: '',
|
|
61
63
|
minWidth: '150px',
|
|
62
64
|
minHeight: '100px',
|
|
63
|
-
...pluginOptions.formSize
|
|
65
|
+
...pluginOptions.formSize,
|
|
64
66
|
},
|
|
65
67
|
canResize: pluginOptions.canResize ?? true,
|
|
66
|
-
maintainRatio: pluginOptions.maintainRatio ?? true
|
|
68
|
+
maintainRatio: pluginOptions.maintainRatio ?? true,
|
|
67
69
|
};
|
|
68
70
|
|
|
69
71
|
// exception
|
|
70
|
-
if (!this
|
|
72
|
+
if (!this.$.plugins.image) {
|
|
71
73
|
console.warn('[SUNEDITOR.plugins.drawing.warn] The drawing plugin must need either "image" plugin. Please add the "image" plugin.');
|
|
72
|
-
} else if (this.pluginOptions.outputFormat === 'svg' && !this
|
|
74
|
+
} else if (this.pluginOptions.outputFormat === 'svg' && !this.$.plugins.image.pluginOptions.uploadUrl) {
|
|
73
75
|
console.warn('[SUNEDITOR.plugins.drawing.warn] The drawing plugin must need the "image" plugin with the "uploadUrl" option. Please add the "image" plugin with the "uploadUrl" option.');
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
// create HTML
|
|
77
|
-
const modalEl = CreateHTML_modal(this);
|
|
79
|
+
const modalEl = CreateHTML_modal(this.$, this.pluginOptions);
|
|
78
80
|
|
|
79
81
|
// modules
|
|
80
|
-
this.modal = new Modal(this, modalEl);
|
|
82
|
+
this.modal = new Modal(this, this.$, modalEl);
|
|
81
83
|
|
|
82
84
|
// members
|
|
83
85
|
this.as = this.pluginOptions.defaultFormatType;
|
|
84
86
|
if (this.pluginOptions.useFormatType) {
|
|
85
87
|
this.asBlock = modalEl.querySelector('[data-command="asBlock"]');
|
|
86
88
|
this.asInline = modalEl.querySelector('[data-command="asInline"]');
|
|
87
|
-
this
|
|
89
|
+
this.$.eventManager.addEvent([this.asBlock, this.asInline], 'click', this.#OnClickAsButton.bind(this));
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
/**
|
|
@@ -96,71 +98,68 @@ class Drawing extends EditorInjector {
|
|
|
96
98
|
this.points = [];
|
|
97
99
|
this.paths = [];
|
|
98
100
|
this.resizeObserver = null;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
|
|
102
|
+
this.#events = {
|
|
103
|
+
touchstart: this.#OnCanvasTouchStart.bind(this),
|
|
104
|
+
touchmove: this.#OnCanvasTouchMove.bind(this),
|
|
105
|
+
mousedown: this.#OnCanvasMouseDown.bind(this),
|
|
106
|
+
mousemove: this.#OnCanvasMouseMove.bind(this),
|
|
102
107
|
mouseup: this.#OnCanvasMouseUp.bind(this),
|
|
103
108
|
mouseleave: this.#OnCanvasMouseLeave.bind(this),
|
|
104
|
-
mouseenter: this.#OnCanvasMouseEnter.bind(this)
|
|
109
|
+
mouseenter: this.#OnCanvasMouseEnter.bind(this),
|
|
105
110
|
};
|
|
106
|
-
this
|
|
111
|
+
this.#eventsRegister = {
|
|
112
|
+
touchstart: null,
|
|
113
|
+
touchmove: null,
|
|
107
114
|
mousedown: null,
|
|
108
115
|
mousemove: null,
|
|
109
116
|
mouseup: null,
|
|
110
117
|
mouseleave: null,
|
|
111
|
-
mouseenter: null
|
|
112
|
-
};
|
|
113
|
-
this.__eventNameMap = {
|
|
114
|
-
mousedown: isMobile ? 'touchstart' : 'mousedown',
|
|
115
|
-
mousemove: isMobile ? 'touchmove' : 'mousemove',
|
|
116
|
-
mouseup: isMobile ? 'touchend' : 'mouseup',
|
|
117
|
-
mouseleave: 'mouseleave',
|
|
118
|
-
mouseenter: 'mouseenter'
|
|
118
|
+
mouseenter: null,
|
|
119
119
|
};
|
|
120
120
|
|
|
121
121
|
// init
|
|
122
|
-
this
|
|
122
|
+
this.$.eventManager.addEvent(modalEl.querySelector('[data-command="remove"]'), 'click', this.#OnRemove.bind(this));
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
|
-
* @
|
|
127
|
-
* @
|
|
126
|
+
* @override
|
|
127
|
+
* @type {PluginModal['open']}
|
|
128
128
|
*/
|
|
129
129
|
open() {
|
|
130
130
|
if (this.pluginOptions.useFormatType) {
|
|
131
|
-
this
|
|
131
|
+
this.#activeAsInline((this.pluginOptions.keepFormatType ? this.as : this.pluginOptions.defaultFormatType) === 'inline');
|
|
132
132
|
}
|
|
133
133
|
this.modal.open();
|
|
134
|
-
this
|
|
134
|
+
this.#initDrawing();
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
|
-
* @
|
|
139
|
-
* @
|
|
138
|
+
* @hook Modules.Modal
|
|
139
|
+
* @type {SunEditor.Hook.Modal.Off}
|
|
140
140
|
*/
|
|
141
|
-
|
|
142
|
-
this
|
|
141
|
+
modalOff() {
|
|
142
|
+
this.#destroyDrawing();
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
|
-
* @
|
|
147
|
-
* @
|
|
148
|
-
* @returns {boolean} Success or failure
|
|
146
|
+
* @hook Modules.Modal
|
|
147
|
+
* @type {SunEditor.Hook.Modal.Action}
|
|
149
148
|
*/
|
|
150
|
-
modalAction() {
|
|
149
|
+
async modalAction() {
|
|
151
150
|
if (this.pluginOptions.outputFormat === 'svg') {
|
|
152
|
-
const files = this
|
|
153
|
-
this
|
|
154
|
-
this
|
|
151
|
+
const files = this.#getSVGFileList();
|
|
152
|
+
this.$.plugins.image.modalInit();
|
|
153
|
+
this.$.plugins.image.submitFile(files);
|
|
155
154
|
} else {
|
|
156
155
|
// dataurl | svg
|
|
157
156
|
const data = this.canvas.toDataURL();
|
|
158
157
|
const file = { name: 'drawing', size: 0 };
|
|
159
|
-
this
|
|
158
|
+
this.$.plugins.image.modalInit();
|
|
160
159
|
if (this.as !== 'inline') {
|
|
161
|
-
this
|
|
160
|
+
this.$.plugins.image.create(data, null, 'auto', '', 'none', file, '');
|
|
162
161
|
} else {
|
|
163
|
-
this
|
|
162
|
+
this.$.plugins.image.createInline(data, null, 'auto', '', 'none', file, '');
|
|
164
163
|
}
|
|
165
164
|
}
|
|
166
165
|
|
|
@@ -168,10 +167,9 @@ class Drawing extends EditorInjector {
|
|
|
168
167
|
}
|
|
169
168
|
|
|
170
169
|
/**
|
|
171
|
-
* @private
|
|
172
170
|
* @description Initializes the drawing canvas, sets up event listeners, and configures resize handling.
|
|
173
171
|
*/
|
|
174
|
-
|
|
172
|
+
#initDrawing() {
|
|
175
173
|
const canvas = (this.canvas = this.modal.form.querySelector('.se-drawing-canvas'));
|
|
176
174
|
this.ctx = canvas.getContext('2d');
|
|
177
175
|
canvas.width = canvas.offsetWidth;
|
|
@@ -180,13 +178,15 @@ class Drawing extends EditorInjector {
|
|
|
180
178
|
this.points = [];
|
|
181
179
|
this.paths = [];
|
|
182
180
|
|
|
183
|
-
this
|
|
181
|
+
this.#setCtx();
|
|
184
182
|
|
|
185
|
-
this.
|
|
186
|
-
this.
|
|
187
|
-
this.
|
|
188
|
-
this.
|
|
189
|
-
this.
|
|
183
|
+
this.#eventsRegister.touchstart = this.$.eventManager.addEvent(canvas, 'touchstart', this.#events.touchstart, { passive: false, capture: true });
|
|
184
|
+
this.#eventsRegister.touchmove = this.$.eventManager.addEvent(canvas, 'touchmove', this.#events.touchmove, true);
|
|
185
|
+
this.#eventsRegister.mousedown = this.$.eventManager.addEvent(canvas, 'mousedown', this.#events.mousedown, { passive: false, capture: true });
|
|
186
|
+
this.#eventsRegister.mousemove = this.$.eventManager.addEvent(canvas, 'mousemove', this.#events.mousemove, true);
|
|
187
|
+
this.#eventsRegister.mouseup = this.$.eventManager.addEvent(canvas, 'mouseup', this.#events.mouseup, true);
|
|
188
|
+
this.#eventsRegister.mouseleave = this.$.eventManager.addEvent(canvas, 'mouseleave', this.#events.mouseleave);
|
|
189
|
+
this.#eventsRegister.mouseenter = this.$.eventManager.addEvent(canvas, 'mouseenter', this.#events.mouseenter);
|
|
190
190
|
|
|
191
191
|
if (this.resizeObserver) {
|
|
192
192
|
this.resizeObserver.disconnect();
|
|
@@ -202,8 +202,8 @@ class Drawing extends EditorInjector {
|
|
|
202
202
|
canvas.width = newWidth;
|
|
203
203
|
canvas.height = newHeight;
|
|
204
204
|
if (prevWidth !== canvas.width || prevHeight !== canvas.height) {
|
|
205
|
-
if (this.pluginOptions.maintainRatio) this
|
|
206
|
-
this
|
|
205
|
+
if (this.pluginOptions.maintainRatio) this.#adjustPathsToNewDimensions(prevWidth, prevHeight, newWidth, newHeight);
|
|
206
|
+
this.#drawAll();
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
209
|
|
|
@@ -212,21 +212,20 @@ class Drawing extends EditorInjector {
|
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
|
-
* @private
|
|
216
215
|
* @description Destroys the drawing canvas, removes event listeners, and clears stored drawing data.
|
|
217
216
|
*/
|
|
218
|
-
|
|
217
|
+
#destroyDrawing() {
|
|
219
218
|
if (this.resizeObserver) {
|
|
220
219
|
this.resizeObserver.disconnect();
|
|
221
220
|
this.resizeObserver = null;
|
|
222
221
|
}
|
|
223
222
|
|
|
224
223
|
if (this.canvas) {
|
|
225
|
-
this
|
|
226
|
-
this
|
|
227
|
-
this
|
|
228
|
-
this
|
|
229
|
-
this
|
|
224
|
+
this.$.eventManager.removeEvent(this.#eventsRegister.mousedown);
|
|
225
|
+
this.$.eventManager.removeEvent(this.#eventsRegister.mousemove);
|
|
226
|
+
this.$.eventManager.removeEvent(this.#eventsRegister.mouseup);
|
|
227
|
+
this.$.eventManager.removeEvent(this.#eventsRegister.mouseleave);
|
|
228
|
+
this.$.eventManager.removeEvent(this.#eventsRegister.mouseenter);
|
|
230
229
|
}
|
|
231
230
|
|
|
232
231
|
this.canvas = null;
|
|
@@ -237,21 +236,19 @@ class Drawing extends EditorInjector {
|
|
|
237
236
|
}
|
|
238
237
|
|
|
239
238
|
/**
|
|
240
|
-
* @private
|
|
241
239
|
* @description Configures the drawing context (canvas settings like line width, color, etc.).
|
|
242
240
|
*/
|
|
243
|
-
|
|
241
|
+
#setCtx() {
|
|
244
242
|
this.ctx.lineWidth = this.pluginOptions.lineWidth;
|
|
245
243
|
this.ctx.lineCap = this.pluginOptions.lineCap;
|
|
246
|
-
this.ctx.strokeStyle = this.pluginOptions.lineColor || _w.getComputedStyle(this.carrierWrapper).color;
|
|
244
|
+
this.ctx.strokeStyle = this.pluginOptions.lineColor || _w.getComputedStyle(this.$.contextProvider.carrierWrapper).color;
|
|
247
245
|
}
|
|
248
246
|
|
|
249
247
|
/**
|
|
250
|
-
* @private
|
|
251
248
|
* @description Draws the current stroke based on collected points.
|
|
252
249
|
*/
|
|
253
|
-
|
|
254
|
-
this
|
|
250
|
+
#draw() {
|
|
251
|
+
this.#setCtx();
|
|
255
252
|
this.ctx.beginPath();
|
|
256
253
|
this.points.forEach(([x, y], i) => {
|
|
257
254
|
if (i === 0) {
|
|
@@ -264,28 +261,26 @@ class Drawing extends EditorInjector {
|
|
|
264
261
|
}
|
|
265
262
|
|
|
266
263
|
/**
|
|
267
|
-
* @private
|
|
268
264
|
* @description Redraws all stored paths onto the canvas.
|
|
269
265
|
*/
|
|
270
|
-
|
|
271
|
-
this
|
|
266
|
+
#drawAll() {
|
|
267
|
+
this.#setCtx();
|
|
272
268
|
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
273
269
|
this.paths.forEach((path) => {
|
|
274
270
|
this.points = path;
|
|
275
|
-
this
|
|
271
|
+
this.#draw();
|
|
276
272
|
});
|
|
277
273
|
this.points = [];
|
|
278
274
|
}
|
|
279
275
|
|
|
280
276
|
/**
|
|
281
|
-
* @private
|
|
282
277
|
* @description Adjusts all stored paths to fit new canvas dimensions after a resize event.
|
|
283
278
|
* @param {number} prevWidth - The previous width of the canvas.
|
|
284
279
|
* @param {number} prevHeight - The previous height of the canvas.
|
|
285
280
|
* @param {number} newWidth - The new width of the canvas.
|
|
286
281
|
* @param {number} newHeight - The new height of the canvas.
|
|
287
282
|
*/
|
|
288
|
-
|
|
283
|
+
#adjustPathsToNewDimensions(prevWidth, prevHeight, newWidth, newHeight) {
|
|
289
284
|
const xRatio = newWidth / prevWidth;
|
|
290
285
|
const yRatio = newHeight / prevHeight;
|
|
291
286
|
|
|
@@ -293,21 +288,19 @@ class Drawing extends EditorInjector {
|
|
|
293
288
|
}
|
|
294
289
|
|
|
295
290
|
/**
|
|
296
|
-
* @private
|
|
297
291
|
* @description Clears the canvas and resets stored drawing paths.
|
|
298
292
|
*/
|
|
299
|
-
|
|
293
|
+
#clearCanvas() {
|
|
300
294
|
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
301
295
|
this.points = [];
|
|
302
296
|
this.paths = [];
|
|
303
297
|
}
|
|
304
298
|
|
|
305
299
|
/**
|
|
306
|
-
* @private
|
|
307
300
|
* @description Generates an SVG representation of the drawn content.
|
|
308
301
|
* @returns {*} The generated SVG element.
|
|
309
302
|
*/
|
|
310
|
-
|
|
303
|
+
#getSVG() {
|
|
311
304
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
312
305
|
const svg = document.createElementNS(svgNS, 'svg');
|
|
313
306
|
svg.setAttribute('width', this.canvas.width + '');
|
|
@@ -331,12 +324,11 @@ class Drawing extends EditorInjector {
|
|
|
331
324
|
}
|
|
332
325
|
|
|
333
326
|
/**
|
|
334
|
-
* @private
|
|
335
327
|
* @description Converts the SVG element into a downloadable file.
|
|
336
328
|
* @returns {FileList} A FileList containing the generated SVG file.
|
|
337
329
|
*/
|
|
338
|
-
|
|
339
|
-
const svgElement = this
|
|
330
|
+
#getSVGFileList() {
|
|
331
|
+
const svgElement = this.#getSVG();
|
|
340
332
|
const serializer = new XMLSerializer();
|
|
341
333
|
const svgString = serializer.serializeToString(svgElement);
|
|
342
334
|
const blob = new Blob([svgString], { type: 'image/svg+xml' });
|
|
@@ -350,12 +342,11 @@ class Drawing extends EditorInjector {
|
|
|
350
342
|
}
|
|
351
343
|
|
|
352
344
|
/**
|
|
353
|
-
* @private
|
|
354
345
|
* @description Retrieves touch coordinates relative to the canvas.
|
|
355
346
|
* @param {TouchEvent} e - The touch event.
|
|
356
347
|
* @returns {{x: number, y: number}} An object containing the x and y coordinates.
|
|
357
348
|
*/
|
|
358
|
-
|
|
349
|
+
#getCanvasTouchPointer(e) {
|
|
359
350
|
const { touches } = e;
|
|
360
351
|
const rect = this.canvas.getBoundingClientRect();
|
|
361
352
|
const x = touches[0].clientX - rect.left;
|
|
@@ -364,11 +355,10 @@ class Drawing extends EditorInjector {
|
|
|
364
355
|
}
|
|
365
356
|
|
|
366
357
|
/**
|
|
367
|
-
* @private
|
|
368
358
|
* @description Activates either block or inline format mode for inserted drawings.
|
|
369
359
|
* @param {boolean} isInline - Whether the drawing should be inserted as an inline element.
|
|
370
360
|
*/
|
|
371
|
-
|
|
361
|
+
#activeAsInline(isInline) {
|
|
372
362
|
if (isInline) {
|
|
373
363
|
dom.utils.addClass(this.asInline, 'on');
|
|
374
364
|
dom.utils.removeClass(this.asBlock, 'on');
|
|
@@ -387,7 +377,7 @@ class Drawing extends EditorInjector {
|
|
|
387
377
|
e.preventDefault();
|
|
388
378
|
this.isDrawing = true;
|
|
389
379
|
this.points.push([e.offsetX, e.offsetY]);
|
|
390
|
-
this
|
|
380
|
+
this.#draw();
|
|
391
381
|
}
|
|
392
382
|
|
|
393
383
|
/**
|
|
@@ -397,7 +387,7 @@ class Drawing extends EditorInjector {
|
|
|
397
387
|
e.preventDefault();
|
|
398
388
|
if (!this.isDrawing) return;
|
|
399
389
|
this.points.push([e.offsetX, e.offsetY]);
|
|
400
|
-
this
|
|
390
|
+
this.#draw();
|
|
401
391
|
}
|
|
402
392
|
|
|
403
393
|
/**
|
|
@@ -405,10 +395,10 @@ class Drawing extends EditorInjector {
|
|
|
405
395
|
*/
|
|
406
396
|
#OnCanvasTouchStart(e) {
|
|
407
397
|
e.preventDefault();
|
|
408
|
-
const { x, y } = this
|
|
398
|
+
const { x, y } = this.#getCanvasTouchPointer(e);
|
|
409
399
|
this.isDrawing = true;
|
|
410
400
|
this.points.push([x, y]);
|
|
411
|
-
this
|
|
401
|
+
this.#draw();
|
|
412
402
|
}
|
|
413
403
|
|
|
414
404
|
/**
|
|
@@ -416,10 +406,10 @@ class Drawing extends EditorInjector {
|
|
|
416
406
|
*/
|
|
417
407
|
#OnCanvasTouchMove(e) {
|
|
418
408
|
e.preventDefault();
|
|
419
|
-
const { x, y } = this
|
|
409
|
+
const { x, y } = this.#getCanvasTouchPointer(e);
|
|
420
410
|
if (!this.isDrawing) return;
|
|
421
411
|
this.points.push([x, y]);
|
|
422
|
-
this
|
|
412
|
+
this.#draw();
|
|
423
413
|
}
|
|
424
414
|
|
|
425
415
|
#OnCanvasMouseUp() {
|
|
@@ -449,28 +439,33 @@ class Drawing extends EditorInjector {
|
|
|
449
439
|
if (!this.pluginOptions.lineReconnect) {
|
|
450
440
|
this.points.push([e.offsetX, e.offsetY]);
|
|
451
441
|
} else {
|
|
452
|
-
const lastPath = this.paths
|
|
453
|
-
const lastPoint = lastPath
|
|
442
|
+
const lastPath = this.paths.at(-1);
|
|
443
|
+
const lastPoint = lastPath.at(-1);
|
|
454
444
|
this.points.push([lastPoint[0], lastPoint[1]]);
|
|
455
445
|
this.points.push([e.offsetX, e.offsetY]);
|
|
456
446
|
}
|
|
457
|
-
this
|
|
447
|
+
this.#draw();
|
|
458
448
|
}
|
|
459
449
|
}
|
|
460
450
|
|
|
461
451
|
#OnRemove() {
|
|
462
|
-
this
|
|
452
|
+
this.#clearCanvas();
|
|
463
453
|
}
|
|
464
454
|
|
|
465
455
|
/**
|
|
466
456
|
* @param {MouseEvent} e - Event object
|
|
467
457
|
*/
|
|
468
458
|
#OnClickAsButton(e) {
|
|
469
|
-
this
|
|
459
|
+
this.#activeAsInline(dom.query.getEventTarget(e).getAttribute('data-command') === 'asInline');
|
|
470
460
|
}
|
|
471
461
|
}
|
|
472
462
|
|
|
473
|
-
|
|
463
|
+
/**
|
|
464
|
+
* @param {SunEditor.Deps} $ - Kernel dependencies
|
|
465
|
+
* @param {DrawingPluginOptions} pluginOptions - Drawing plugin options
|
|
466
|
+
* @returns {HTMLElement}
|
|
467
|
+
*/
|
|
468
|
+
function CreateHTML_modal({ lang, icons }, pluginOptions) {
|
|
474
469
|
const { width, height, maxWidth, maxHeight, minWidth, minHeight } = pluginOptions.formSize;
|
|
475
470
|
const html = /*html*/ `
|
|
476
471
|
<form>
|
|
@@ -522,9 +517,9 @@ function CreateHTML_modal({ lang, icons, pluginOptions }) {
|
|
|
522
517
|
'DIV',
|
|
523
518
|
{
|
|
524
519
|
class: 'se-modal-content se-modal-responsive',
|
|
525
|
-
style: `max-width: ${maxWidth}; max-height: ${maxHeight}
|
|
520
|
+
style: `max-width: ${maxWidth}; max-height: ${maxHeight};`,
|
|
526
521
|
},
|
|
527
|
-
html
|
|
522
|
+
html,
|
|
528
523
|
);
|
|
529
524
|
}
|
|
530
525
|
|