suneditor 3.0.0-beta.3 → 3.0.0-beta.30
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 +8 -8
- package/README.md +44 -49
- package/dist/suneditor.min.css +1 -1
- package/dist/suneditor.min.js +1 -1
- package/package.json +95 -53
- package/src/assets/design/color.css +2 -2
- package/src/assets/design/size.css +2 -0
- package/src/assets/icons/defaultIcons.js +16 -1
- package/src/assets/suneditor-contents.css +9 -8
- package/src/assets/suneditor.css +29 -26
- package/src/core/{section → base}/actives.js +20 -12
- package/src/core/base/history.js +4 -4
- package/src/core/class/char.js +10 -10
- package/src/core/class/component.js +146 -57
- package/src/core/class/format.js +94 -2458
- package/src/core/class/html.js +187 -129
- package/src/core/class/inline.js +1853 -0
- package/src/core/class/listFormat.js +582 -0
- package/src/core/class/menu.js +14 -3
- package/src/core/class/nodeTransform.js +9 -14
- package/src/core/class/offset.js +162 -197
- package/src/core/class/selection.js +137 -34
- package/src/core/class/toolbar.js +73 -52
- package/src/core/class/ui.js +11 -11
- package/src/core/class/viewer.js +56 -55
- package/src/core/config/context.js +122 -0
- package/src/core/config/frameContext.js +204 -0
- package/src/core/config/options.js +639 -0
- package/src/core/editor.js +181 -108
- package/src/core/event/actions/index.js +229 -0
- package/src/core/event/effects/common.registry.js +60 -0
- package/src/core/event/effects/keydown.registry.js +551 -0
- package/src/core/event/effects/ruleHelpers.js +145 -0
- package/src/core/{base → event}/eventManager.js +119 -201
- package/src/core/event/executor.js +21 -0
- package/src/core/{base/eventHandlers → event/handlers}/handler_toolbar.js +4 -4
- package/src/core/{base/eventHandlers → event/handlers}/handler_ww_dragDrop.js +2 -2
- package/src/core/event/handlers/handler_ww_input.js +77 -0
- package/src/core/event/handlers/handler_ww_key.js +228 -0
- package/src/core/{base/eventHandlers → event/handlers}/handler_ww_mouse.js +3 -3
- package/src/core/event/ports.js +211 -0
- package/src/core/event/reducers/keydown.reducer.js +89 -0
- package/src/core/event/rules/keydown.rule.arrow.js +54 -0
- package/src/core/event/rules/keydown.rule.backspace.js +202 -0
- package/src/core/event/rules/keydown.rule.delete.js +126 -0
- package/src/core/event/rules/keydown.rule.enter.js +144 -0
- package/src/core/event/rules/keydown.rule.tab.js +29 -0
- package/src/core/section/constructor.js +79 -388
- package/src/core/section/documentType.js +47 -26
- package/src/core/util/instanceCheck.js +59 -0
- package/src/editorInjector/_classes.js +4 -0
- package/src/editorInjector/_core.js +17 -7
- package/src/editorInjector/index.js +10 -2
- package/src/events.js +6 -0
- package/src/helper/clipboard.js +24 -10
- package/src/helper/converter.js +17 -12
- package/src/helper/dom/domCheck.js +22 -3
- package/src/helper/dom/domQuery.js +91 -45
- package/src/helper/dom/domUtils.js +93 -19
- package/src/helper/dom/index.js +4 -0
- package/src/helper/env.js +11 -7
- package/src/helper/keyCodeMap.js +4 -3
- package/src/langs/ckb.js +1 -1
- package/src/langs/cs.js +1 -1
- package/src/langs/da.js +1 -1
- package/src/langs/de.js +1 -1
- package/src/langs/en.js +1 -1
- package/src/langs/es.js +1 -1
- package/src/langs/fa.js +1 -1
- package/src/langs/fr.js +1 -1
- package/src/langs/he.js +1 -1
- package/src/langs/hu.js +1 -1
- package/src/langs/it.js +1 -1
- package/src/langs/ja.js +1 -1
- package/src/langs/km.js +1 -1
- package/src/langs/ko.js +1 -1
- package/src/langs/lv.js +1 -1
- package/src/langs/nl.js +1 -1
- package/src/langs/pl.js +1 -1
- package/src/langs/pt_br.js +10 -10
- package/src/langs/ro.js +1 -1
- package/src/langs/ru.js +1 -1
- package/src/langs/se.js +1 -1
- package/src/langs/tr.js +1 -1
- package/src/langs/uk.js +1 -1
- package/src/langs/ur.js +1 -1
- package/src/langs/zh_cn.js +1 -1
- package/src/modules/ApiManager.js +25 -18
- package/src/modules/Browser.js +52 -61
- package/src/modules/ColorPicker.js +37 -38
- package/src/modules/Controller.js +85 -79
- package/src/modules/Figure.js +275 -187
- package/src/modules/FileManager.js +86 -92
- package/src/modules/HueSlider.js +67 -35
- package/src/modules/Modal.js +84 -77
- package/src/modules/ModalAnchorEditor.js +62 -79
- package/src/modules/SelectMenu.js +89 -86
- package/src/plugins/browser/audioGallery.js +9 -5
- package/src/plugins/browser/fileBrowser.js +10 -6
- package/src/plugins/browser/fileGallery.js +9 -5
- package/src/plugins/browser/imageGallery.js +9 -5
- package/src/plugins/browser/videoGallery.js +11 -6
- package/src/plugins/command/blockquote.js +1 -0
- package/src/plugins/command/exportPDF.js +11 -8
- package/src/plugins/command/fileUpload.js +41 -29
- package/src/plugins/command/list_bulleted.js +2 -1
- package/src/plugins/command/list_numbered.js +2 -1
- package/src/plugins/dropdown/align.js +8 -2
- package/src/plugins/dropdown/backgroundColor.js +19 -11
- package/src/plugins/dropdown/font.js +15 -9
- package/src/plugins/dropdown/fontColor.js +19 -11
- package/src/plugins/dropdown/formatBlock.js +7 -2
- package/src/plugins/dropdown/hr.js +7 -3
- package/src/plugins/dropdown/layout.js +6 -2
- package/src/plugins/dropdown/lineHeight.js +8 -3
- package/src/plugins/dropdown/list.js +2 -1
- package/src/plugins/dropdown/paragraphStyle.js +15 -11
- package/src/plugins/dropdown/{table.js → table/index.js} +514 -362
- package/src/plugins/dropdown/template.js +6 -2
- package/src/plugins/dropdown/textStyle.js +7 -3
- package/src/plugins/field/mention.js +33 -27
- package/src/plugins/input/fontSize.js +44 -37
- package/src/plugins/input/pageNavigator.js +3 -2
- package/src/plugins/modal/audio.js +90 -85
- package/src/plugins/modal/drawing.js +58 -66
- package/src/plugins/modal/embed.js +193 -180
- package/src/plugins/modal/image.js +441 -439
- package/src/plugins/modal/link.js +31 -8
- package/src/plugins/modal/math.js +23 -22
- package/src/plugins/modal/video.js +233 -230
- package/src/plugins/popup/anchor.js +24 -18
- package/src/suneditor.js +69 -24
- package/src/typedef.js +42 -19
- package/types/assets/icons/defaultIcons.d.ts +8 -0
- package/types/core/class/char.d.ts +1 -1
- package/types/core/class/component.d.ts +29 -7
- package/types/core/class/format.d.ts +4 -354
- package/types/core/class/html.d.ts +13 -4
- package/types/core/class/inline.d.ts +263 -0
- package/types/core/class/listFormat.d.ts +135 -0
- package/types/core/class/menu.d.ts +10 -2
- package/types/core/class/offset.d.ts +24 -26
- package/types/core/class/selection.d.ts +2 -0
- package/types/core/class/toolbar.d.ts +24 -11
- package/types/core/class/ui.d.ts +1 -1
- package/types/core/class/viewer.d.ts +1 -1
- package/types/core/config/context.d.ts +157 -0
- package/types/core/config/frameContext.d.ts +367 -0
- package/types/core/config/options.d.ts +1119 -0
- package/types/core/editor.d.ts +101 -66
- package/types/core/event/actions/index.d.ts +47 -0
- package/types/core/event/effects/common.registry.d.ts +50 -0
- package/types/core/event/effects/keydown.registry.d.ts +73 -0
- package/types/core/event/effects/ruleHelpers.d.ts +31 -0
- package/types/core/{base → event}/eventManager.d.ts +15 -46
- package/types/core/event/executor.d.ts +6 -0
- package/types/core/event/handlers/handler_ww_input.d.ts +41 -0
- package/types/core/{base/eventHandlers/handler_ww_key_input.d.ts → event/handlers/handler_ww_key.d.ts} +4 -6
- package/types/core/event/ports.d.ts +255 -0
- package/types/core/event/reducers/keydown.reducer.d.ts +75 -0
- package/types/core/event/rules/keydown.rule.arrow.d.ts +8 -0
- package/types/core/event/rules/keydown.rule.backspace.d.ts +9 -0
- package/types/core/event/rules/keydown.rule.delete.d.ts +9 -0
- package/types/core/event/rules/keydown.rule.enter.d.ts +9 -0
- package/types/core/event/rules/keydown.rule.tab.d.ts +9 -0
- package/types/core/section/constructor.d.ts +101 -631
- package/types/core/section/documentType.d.ts +14 -4
- package/types/core/util/instanceCheck.d.ts +50 -0
- package/types/editorInjector/_classes.d.ts +4 -0
- package/types/editorInjector/_core.d.ts +17 -7
- package/types/editorInjector/index.d.ts +10 -2
- package/types/events.d.ts +1 -0
- package/types/helper/clipboard.d.ts +2 -2
- package/types/helper/converter.d.ts +6 -9
- package/types/helper/dom/domCheck.d.ts +7 -0
- package/types/helper/dom/domQuery.d.ts +19 -8
- package/types/helper/dom/domUtils.d.ts +24 -2
- package/types/helper/dom/index.d.ts +86 -1
- package/types/helper/env.d.ts +6 -1
- package/types/helper/index.d.ts +7 -1
- package/types/helper/keyCodeMap.d.ts +3 -3
- package/types/index.d.ts +23 -117
- package/types/langs/index.d.ts +2 -2
- package/types/modules/ApiManager.d.ts +1 -8
- package/types/modules/Browser.d.ts +4 -62
- package/types/modules/ColorPicker.d.ts +4 -21
- package/types/modules/Controller.d.ts +8 -64
- package/types/modules/Figure.d.ts +54 -50
- package/types/modules/FileManager.d.ts +1 -13
- package/types/modules/HueSlider.d.ts +13 -3
- package/types/modules/Modal.d.ts +0 -43
- package/types/modules/ModalAnchorEditor.d.ts +0 -73
- package/types/modules/SelectMenu.d.ts +0 -85
- package/types/modules/index.d.ts +3 -3
- package/types/plugins/browser/audioGallery.d.ts +29 -18
- package/types/plugins/browser/fileBrowser.d.ts +38 -27
- package/types/plugins/browser/fileGallery.d.ts +29 -18
- package/types/plugins/browser/imageGallery.d.ts +24 -16
- package/types/plugins/browser/videoGallery.d.ts +29 -18
- package/types/plugins/command/blockquote.d.ts +1 -0
- package/types/plugins/command/exportPDF.d.ts +18 -18
- package/types/plugins/command/fileUpload.d.ts +65 -45
- package/types/plugins/command/list_bulleted.d.ts +1 -0
- package/types/plugins/command/list_numbered.d.ts +1 -0
- package/types/plugins/dropdown/align.d.ts +13 -8
- package/types/plugins/dropdown/backgroundColor.d.ts +30 -19
- package/types/plugins/dropdown/font.d.ts +13 -12
- package/types/plugins/dropdown/fontColor.d.ts +30 -19
- package/types/plugins/dropdown/formatBlock.d.ts +13 -8
- package/types/plugins/dropdown/hr.d.ts +15 -11
- package/types/plugins/dropdown/layout.d.ts +15 -11
- package/types/plugins/dropdown/lineHeight.d.ts +16 -11
- package/types/plugins/dropdown/list.d.ts +1 -0
- package/types/plugins/dropdown/paragraphStyle.d.ts +31 -27
- package/types/plugins/dropdown/table/index.d.ts +582 -0
- package/types/plugins/dropdown/table.d.ts +41 -86
- package/types/plugins/dropdown/template.d.ts +15 -11
- package/types/plugins/dropdown/textStyle.d.ts +19 -11
- package/types/plugins/field/mention.d.ts +58 -56
- package/types/plugins/index.d.ts +38 -38
- package/types/plugins/input/fontSize.d.ts +46 -50
- package/types/plugins/modal/audio.d.ts +26 -56
- package/types/plugins/modal/drawing.d.ts +0 -85
- package/types/plugins/modal/embed.d.ts +15 -79
- package/types/plugins/modal/image.d.ts +24 -136
- package/types/plugins/modal/link.d.ts +34 -15
- package/types/plugins/modal/math.d.ts +0 -16
- package/types/plugins/modal/video.d.ts +17 -86
- package/types/plugins/popup/anchor.d.ts +1 -8
- package/types/suneditor.d.ts +70 -19
- package/types/typedef.d.ts +60 -46
- package/src/core/base/eventHandlers/handler_ww_key_input.js +0 -1200
- package/src/core/section/context.js +0 -102
- package/types/core/section/context.d.ts +0 -45
- package/types/langs/_Lang.d.ts +0 -194
- /package/src/core/{base/eventHandlers → event/handlers}/handler_ww_clipboard.js +0 -0
- /package/types/core/{section → base}/actives.d.ts +0 -0
- /package/types/core/{base/eventHandlers → event/handlers}/handler_toolbar.d.ts +0 -0
- /package/types/core/{base/eventHandlers → event/handlers}/handler_ww_clipboard.d.ts +0 -0
- /package/types/core/{base/eventHandlers → event/handlers}/handler_ww_dragDrop.d.ts +0 -0
- /package/types/core/{base/eventHandlers → event/handlers}/handler_ww_mouse.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,13 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "suneditor",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
4
|
-
"description": "Vanilla
|
|
3
|
+
"version": "3.0.0-beta.30",
|
|
4
|
+
"description": "Vanilla JavaScript based WYSIWYG web editor",
|
|
5
5
|
"author": "Yi JiHong",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "src/suneditor.js",
|
|
8
|
+
"module": "src/suneditor.js",
|
|
8
9
|
"types": "types/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./types/index.d.ts",
|
|
13
|
+
"default": "./src/suneditor.js"
|
|
14
|
+
},
|
|
15
|
+
"./src/plugins": {
|
|
16
|
+
"types": "./types/plugins/index.d.ts",
|
|
17
|
+
"default": "./src/plugins/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./src/modules": {
|
|
20
|
+
"types": "./types/modules/index.d.ts",
|
|
21
|
+
"default": "./src/modules/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./src/helper": {
|
|
24
|
+
"types": "./types/helper/index.d.ts",
|
|
25
|
+
"default": "./src/helper/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./src/helper/dom": {
|
|
28
|
+
"types": "./types/helper/dom/index.d.ts",
|
|
29
|
+
"default": "./src/helper/dom/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./src/langs": {
|
|
32
|
+
"types": "./types/langs/index.d.ts",
|
|
33
|
+
"default": "./src/langs/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./src/*": "./src/*",
|
|
36
|
+
"./types/*": "./types/*",
|
|
37
|
+
"./dist/*": "./dist/*"
|
|
38
|
+
},
|
|
9
39
|
"sideEffects": [
|
|
10
|
-
"./src/assets
|
|
40
|
+
"./src/assets/*.css"
|
|
11
41
|
],
|
|
12
42
|
"engines": {
|
|
13
43
|
"node": ">=14.0.0"
|
|
@@ -17,13 +47,20 @@
|
|
|
17
47
|
"start": "npm run dev",
|
|
18
48
|
"build:dev": "cross-env NODE_ENV=development webpack --config webpack/builder.js",
|
|
19
49
|
"build:prod": "cross-env NODE_ENV=production webpack --config webpack/builder.js",
|
|
20
|
-
"lint": "
|
|
50
|
+
"lint:type": "npx tsc --noEmit",
|
|
21
51
|
"lint:fix-js": "npx eslint \"src/**/*.js\" --fix",
|
|
22
52
|
"lint:fix-ts": "npx eslint \"types/**/*.ts\" --fix",
|
|
23
53
|
"lint:fix-all": "npx eslint \"src/**/*.js\" \"types/**/*.ts\" --fix",
|
|
24
|
-
"
|
|
54
|
+
"lint": "npm run lint:fix-all && npm run lint:type",
|
|
55
|
+
"ts-build": "(npx tsc || true) && barrelsby --config .barrelsby.json && node scripts/format-index.cjs && node scripts/fix-langs.cjs && node scripts/wrap-dts.cjs && node scripts/rename-index.cjs && node scripts/remove-this-params.cjs && node scripts/gen-options-dts.cjs && npm run lint:fix-ts",
|
|
25
56
|
"i18n-build": "cross-env GOOGLE_APPLICATION_CREDENTIALS=./.env/google-api-service-account.json node scripts/i18n-sync.cjs --auto-translate && npx eslint \"src/langs/*.js\" --fix && npx eslint \"types/langs/_Lang.d.ts\" --fix",
|
|
26
|
-
"test": "
|
|
57
|
+
"test": "jest --silent",
|
|
58
|
+
"test:watch": "jest --watch",
|
|
59
|
+
"test:coverage": "jest --coverage",
|
|
60
|
+
"test:e2e": "playwright test",
|
|
61
|
+
"test:e2e:ui": "playwright test --ui",
|
|
62
|
+
"test:e2e:headed": "playwright test --headed",
|
|
63
|
+
"test:all": "jest --silent && playwright test",
|
|
27
64
|
"update-browserslist": "npx browserslist@latest --update-db"
|
|
28
65
|
},
|
|
29
66
|
"bugs": {
|
|
@@ -35,61 +72,63 @@
|
|
|
35
72
|
"url": "https://github.com/JiHong88/SunEditor.git"
|
|
36
73
|
},
|
|
37
74
|
"devDependencies": {
|
|
38
|
-
"@babel/core": "^7.
|
|
39
|
-
"@
|
|
40
|
-
"@codemirror/lang-
|
|
41
|
-
"@
|
|
75
|
+
"@babel/core": "^7.28.4",
|
|
76
|
+
"@babel/preset-env": "^7.28.3",
|
|
77
|
+
"@codemirror/lang-html": "^6.4.10",
|
|
78
|
+
"@codemirror/lang-javascript": "^6.2.4",
|
|
79
|
+
"@google-cloud/translate": "^9.2.0",
|
|
42
80
|
"@octokit/rest": "^21.1.1",
|
|
43
|
-
"@
|
|
44
|
-
"@typescript-eslint/
|
|
45
|
-
"@
|
|
46
|
-
"
|
|
81
|
+
"@playwright/test": "^1.56.0",
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
|
83
|
+
"@typescript-eslint/parser": "^8.45.0",
|
|
84
|
+
"@webpack-cli/serve": "^3.0.1",
|
|
85
|
+
"babel-jest": "^30.2.0",
|
|
86
|
+
"babel-loader": "^10.0.0",
|
|
47
87
|
"barrelsby": "^2.8.1",
|
|
48
88
|
"clean-webpack-plugin": "^4.0.0",
|
|
49
|
-
"codemirror": "^6.
|
|
50
|
-
"codemirror5": "npm:codemirror
|
|
89
|
+
"codemirror": "^6.65.7",
|
|
90
|
+
"codemirror5": "npm:codemirror@5.65.20",
|
|
51
91
|
"cross-env": "^7.0.3",
|
|
52
|
-
"css-loader": "^
|
|
53
|
-
"css-minimizer-webpack-plugin": "^
|
|
54
|
-
"csstype": "^3.1.
|
|
55
|
-
"eslint
|
|
56
|
-
"eslint-
|
|
57
|
-
"eslint-plugin-
|
|
92
|
+
"css-loader": "^7.1.2",
|
|
93
|
+
"css-minimizer-webpack-plugin": "^7.0.2",
|
|
94
|
+
"csstype": "^3.1.3",
|
|
95
|
+
"eslint": "^9.36.0",
|
|
96
|
+
"eslint-config-prettier": "^10.1.8",
|
|
97
|
+
"eslint-plugin-compat": "^6.0.2",
|
|
98
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
99
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
58
100
|
"file-loader": "^6.2.0",
|
|
59
|
-
"glob": "^11.0.
|
|
60
|
-
"html-webpack-plugin": "^5.
|
|
61
|
-
"
|
|
101
|
+
"glob": "^11.0.3",
|
|
102
|
+
"html-webpack-plugin": "^5.6.4",
|
|
103
|
+
"http-server": "^14.1.1",
|
|
104
|
+
"jest": "^30.2.0",
|
|
105
|
+
"jest-environment-jsdom": "^30.2.0",
|
|
62
106
|
"jsdoc": "^4.0.4",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"karma-firefox-launcher": "^2.1.2",
|
|
66
|
-
"karma-jasmine": "^5.1.0",
|
|
67
|
-
"karma-opera-launcher": "^1.0.0",
|
|
68
|
-
"karma-safari-launcher": "^1.0.0",
|
|
69
|
-
"karma-webpack": "^5.0.0",
|
|
70
|
-
"katex": "^0.16.7",
|
|
107
|
+
"jsdom": "^27.0.0",
|
|
108
|
+
"katex": "^0.16.22",
|
|
71
109
|
"mathjax-full": "^3.2.2",
|
|
72
|
-
"mini-css-extract-plugin": "^2.
|
|
73
|
-
"prettier": "^
|
|
74
|
-
"terser-webpack-plugin": "^5.3.
|
|
75
|
-
"typescript": "^5.
|
|
110
|
+
"mini-css-extract-plugin": "^2.9.4",
|
|
111
|
+
"prettier": "^3.6.2",
|
|
112
|
+
"terser-webpack-plugin": "^5.3.14",
|
|
113
|
+
"typescript": "^5.9.2",
|
|
76
114
|
"url-loader": "^4.1.1",
|
|
77
|
-
"webpack": "^5.
|
|
78
|
-
"webpack-
|
|
79
|
-
"webpack-
|
|
80
|
-
"webpack-
|
|
115
|
+
"webpack": "^5.102.0",
|
|
116
|
+
"webpack-bundle-analyzer": "^4.10.2",
|
|
117
|
+
"webpack-cli": "^6.0.1",
|
|
118
|
+
"webpack-dev-server": "^5.2.2",
|
|
119
|
+
"webpack-merge": "^6.0.1"
|
|
81
120
|
},
|
|
82
121
|
"browserslist": [
|
|
83
|
-
"chrome >=
|
|
84
|
-
"edge >=
|
|
85
|
-
"firefox >=
|
|
86
|
-
"safari >=
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"not IE
|
|
92
|
-
"not
|
|
122
|
+
"chrome >= 119",
|
|
123
|
+
"edge >= 119",
|
|
124
|
+
"firefox >= 121",
|
|
125
|
+
"safari >= 17",
|
|
126
|
+
"opera >= 105",
|
|
127
|
+
"samsung >= 23",
|
|
128
|
+
"Firefox ESR",
|
|
129
|
+
"not dead",
|
|
130
|
+
"not IE 11",
|
|
131
|
+
"not op_mini all"
|
|
93
132
|
],
|
|
94
133
|
"ignore": [
|
|
95
134
|
"**/.*",
|
|
@@ -104,6 +143,7 @@
|
|
|
104
143
|
"LICENSE"
|
|
105
144
|
],
|
|
106
145
|
"keywords": [
|
|
146
|
+
"suneditor",
|
|
107
147
|
"wysiwyg",
|
|
108
148
|
"wysiwyg editor",
|
|
109
149
|
"wysiwyg html editor",
|
|
@@ -111,12 +151,14 @@
|
|
|
111
151
|
"rich text editor",
|
|
112
152
|
"rich editor",
|
|
113
153
|
"html editor",
|
|
114
|
-
"
|
|
115
|
-
"editor",
|
|
154
|
+
"html5 editor",
|
|
116
155
|
"javascript editor",
|
|
156
|
+
"javascript rich text editor",
|
|
117
157
|
"vanilla javascript",
|
|
118
158
|
"contenteditable",
|
|
119
159
|
"lightweight editor",
|
|
160
|
+
"lightweight rich text editor",
|
|
161
|
+
"open source editor",
|
|
120
162
|
"text formatting",
|
|
121
163
|
"web editor",
|
|
122
164
|
"browser editor"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
--se-drag-over-color: #f0c20a;
|
|
69
69
|
|
|
70
70
|
/* modal, browser, dropdown */
|
|
71
|
-
--se-modal-background-color: #
|
|
71
|
+
--se-modal-background-color: #fff;
|
|
72
72
|
--se-modal-color: #333;
|
|
73
73
|
--se-modal-border-color: #e5e5e5;
|
|
74
74
|
--se-modal-anchor-color: #004cff;
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
|
|
83
83
|
/* controller */
|
|
84
84
|
--se-controller-border-color: #999;
|
|
85
|
-
--se-controller-background-color: #
|
|
85
|
+
--se-controller-background-color: #fff;
|
|
86
86
|
--se-controller-color: #333;
|
|
87
87
|
--se-shadow-controller-color: rgba(0, 0, 0, 0.2);
|
|
88
88
|
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
/* main */
|
|
5
5
|
--se-edit-inner-padding: 1.5em 1.5em;
|
|
6
6
|
--se-edit-inner-padding-doc-type: 2.5rem 2.5rem;
|
|
7
|
+
--se-edit-scroll-margin: 3em;
|
|
7
8
|
|
|
8
9
|
/** --------------------------- layout - [size] ----------- */
|
|
9
10
|
/** main, common */
|
|
10
11
|
--se-border-radius: 2px;
|
|
11
12
|
--se-min-height: 65px;
|
|
13
|
+
--se-scroll-padding: 2em;
|
|
12
14
|
|
|
13
15
|
/* modal */
|
|
14
16
|
--se-modal-input-width: 70px;
|
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
print: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18,3H6V7H18M19,12A1,1 0 0,1 18,11A1,1 0 0,1 19,10A1,1 0 0,1 20,11A1,1 0 0,1 19,12M16,19H8V14H16M19,8H5A3,3 0 0,0 2,11V17H6V21H18V17H22V11A3,3 0 0,0 19,8Z" /></svg>',
|
|
26
26
|
template:
|
|
27
27
|
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13,7.5H18V9.5H13V7.5M13,14.5H18V16.5H13V14.5M19,3A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V5A2,2 0 0,1 5,3H19M19,19V5H5V19H19M11,6V11H6V6H11M10,10V7H7V10H10M11,13V18H6V13H11M10,17V14H7V17H10Z" /></svg>',
|
|
28
|
-
layout: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="
|
|
28
|
+
layout: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13H3A1 1 0 0 0 2 14V20A1 1 0 0 0 3 21H21A1 1 0 0 0 22 20V14A1 1 0 0 0 21 13M20 19H4V15H20M21 3H3A1 1 0 0 0 2 4V10A1 1 0 0 0 3 11H21A1 1 0 0 0 22 10V4A1 1 0 0 0 21 3M20 9H4V5H20Z" /></svg>',
|
|
29
29
|
new_document: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z" /></svg>',
|
|
30
30
|
select_all:
|
|
31
31
|
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9,9H15V15H9M7,17H17V7H7M15,5H17V3H15M15,21H17V19H15M19,17H21V15H19M19,9H21V7H19M19,21A2,2 0 0,0 21,19H19M19,13H21V11H19M11,21H13V19H11M9,3H7V5H9M3,17H5V15H3M5,21V19H3A2,2 0 0,0 5,21M19,3V5H21A2,2 0 0,0 19,3M13,3H11V5H13M3,9H5V7H3M7,21H9V19H7M3,13H5V11H3M3,5H5V3A2,2 0 0,0 3,5Z" /></svg>',
|
|
@@ -60,6 +60,8 @@ export default {
|
|
|
60
60
|
'<svg class="se-ci" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 12.37"><g><path d="M7.77,16.12a1.59,1.59,0,0,0-.49-1.18,1.62,1.62,0,0,0-1.19-.49,1.68,1.68,0,1,0,0,3.36,1.67,1.67,0,0,0,1.68-1.69Zm0-4.48A1.67,1.67,0,0,0,6.09,10,1.68,1.68,0,0,0,4.9,12.82a1.62,1.62,0,0,0,1.19.49,1.67,1.67,0,0,0,1.68-1.67Zm12.38,3.64a.27.27,0,0,0-.08-.19.28.28,0,0,0-.2-.09H9.19a.28.28,0,0,0-.2.08.29.29,0,0,0-.08.19V17a.27.27,0,0,0,.28.28H19.87a.27.27,0,0,0,.19-.08.24.24,0,0,0,.08-.2V15.28ZM7.77,7.13a1.63,1.63,0,0,0-.49-1.2,1.61,1.61,0,0,0-1.19-.49,1.61,1.61,0,0,0-1.19.49,1.71,1.71,0,0,0,0,2.4,1.62,1.62,0,0,0,1.19.49,1.61,1.61,0,0,0,1.19-.49,1.63,1.63,0,0,0,.49-1.2Zm12.38,3.66a.28.28,0,0,0-.08-.2.29.29,0,0,0-.19-.08H9.19a.27.27,0,0,0-.28.28v1.69a.27.27,0,0,0,.08.19.24.24,0,0,0,.2.08H19.87a.27.27,0,0,0,.19-.08.25.25,0,0,0,.08-.19V10.79Zm0-4.5a.27.27,0,0,0-.08-.19A.25.25,0,0,0,19.88,6H9.19A.28.28,0,0,0,9,6.1a.26.26,0,0,0-.08.19V8A.27.27,0,0,0,9,8.17a.24.24,0,0,0,.2.08H19.87a.27.27,0,0,0,.19-.08A.25.25,0,0,0,20.14,8V6.29Z" transform="translate(-4.41 -5.44)"/></g></svg>',
|
|
61
61
|
list_numbered:
|
|
62
62
|
'<svg class="se-ci" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.69 15.74"><g><path d="M7.66,18a1.24,1.24,0,0,0-.26-.78,1.17,1.17,0,0,0-.72-.42l.85-1V15H4.58v1.34h.94v-.46l.85,0h0c-.11.11-.22.23-.32.35s-.23.27-.37.47L5.39,17l.23.51c.61-.05.92.11.92.49a.42.42,0,0,1-.18.37.79.79,0,0,1-.45.12A1.41,1.41,0,0,1,5,18.15l-.51.77A2.06,2.06,0,0,0,6,19.5a1.8,1.8,0,0,0,1.2-.41A1.38,1.38,0,0,0,7.66,18Zm0-5.54H6.75V13H5.63A.72.72,0,0,1,6,12.51a5.45,5.45,0,0,1,.66-.45,2.71,2.71,0,0,0,.67-.57,1.19,1.19,0,0,0,.31-.81,1.29,1.29,0,0,0-.45-1,1.86,1.86,0,0,0-2-.11,1.51,1.51,0,0,0-.62.7l.74.52A.87.87,0,0,1,6,10.28a.51.51,0,0,1,.35.12.42.42,0,0,1,.13.33.55.55,0,0,1-.21.4,3,3,0,0,1-.5.38c-.19.13-.39.27-.58.42a2,2,0,0,0-.5.6,1.63,1.63,0,0,0-.21.81,3.89,3.89,0,0,0,.05.48h3.2V12.44Zm12.45,2.82a.27.27,0,0,0-.08-.19.28.28,0,0,0-.21-.08H9.1a.32.32,0,0,0-.21.08.24.24,0,0,0-.08.2V17a.27.27,0,0,0,.08.19.3.3,0,0,0,.21.08H19.83a.32.32,0,0,0,.21-.08.25.25,0,0,0,.08-.19V15.26ZM7.69,7.32h-1V3.76H5.8L4.6,4.88l.63.68a1.85,1.85,0,0,0,.43-.48h0l0,2.24H4.74V8.2h3V7.32Zm12.43,3.42a.27.27,0,0,0-.08-.19.28.28,0,0,0-.21-.08H9.1a.32.32,0,0,0-.21.08.24.24,0,0,0-.08.2v1.71a.27.27,0,0,0,.08.19.3.3,0,0,0,.21.08H19.83a.32.32,0,0,0,.21-.08.25.25,0,0,0,.08-.19V10.74Zm0-4.52A.27.27,0,0,0,20,6,.28.28,0,0,0,19.83,6H9.1A.32.32,0,0,0,8.89,6a.24.24,0,0,0-.08.19V7.93a.27.27,0,0,0,.08.19.32.32,0,0,0,.21.08H19.83A.32.32,0,0,0,20,8.12a.26.26,0,0,0,.08-.2V6.22Z" transform="translate(-4.43 -3.76)"/></g></svg>',
|
|
63
|
+
list_checked:
|
|
64
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21,19V17H8V19H21M21,13V11H8V13H21M8,7H21V5H8V7M4,5V7H6V5H4M3,5A1,1 0 0,1 4,4H6A1,1 0 0,1 7,5V7A1,1 0 0,1 6,8H4A1,1 0 0,1 3,7V5M4,11V13H6V11H4M3,11A1,1 0 0,1 4,10H6A1,1 0 0,1 7,11V13A1,1 0 0,1 6,14H4A1,1 0 0,1 3,13V11M4,17V19H6V17H4M3,17A1,1 0 0,1 4,16H6A1,1 0 0,1 7,17V19A1,1 0 0,1 6,20H4A1,1 0 0,1 3,19V17Z" /></svg>',
|
|
63
65
|
table: '<svg class="se-ci" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.74"><g><path d="M4.41,8.05V3.76H8.7V8.05H4.41Zm5.71,0V3.76h4.3V8.05h-4.3Zm5.74-4.29h4.29V8.05H15.86V3.76Zm-11.45,10V9.48H8.7v4.3H4.41Zm5.71,0V9.48h4.3v4.3h-4.3Zm5.74,0V9.48h4.29v4.3H15.86ZM4.41,19.5V15.21H8.7V19.5H4.41Zm5.71,0V15.21h4.3V19.5h-4.3Zm5.74,0V15.21h4.29V19.5H15.86Z" transform="translate(-4.41 -3.76)"/></g></svg>',
|
|
64
66
|
table_header:
|
|
65
67
|
'<svg class="se-ci" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 15.74"><g><path d="M17,19.5v-.78H15.5v.78H17Zm-3,0v-.78H12.5v.78H14Zm-3,0v-.78H9.53v.78H11Zm-3,0v-.78H6.53v.78H8Zm10.55,0a1.73,1.73,0,0,0,.85-.35,1.67,1.67,0,0,0,.56-.76l-.71-.31a1.21,1.21,0,0,1-.35.4,1.34,1.34,0,0,1-.53.23l.08.38c.06.24.09.38.1.41Zm-13.7-.63.55-.55A.77.77,0,0,1,5.25,18a1.31,1.31,0,0,1-.06-.38v-.38H4.41v.38a2,2,0,0,0,.12.68,1.6,1.6,0,0,0,.35.57Zm15.27-2.12V15.26h-.78v1.49h.78Zm-15-1V14.23H4.41v1.49h.78Zm15-2V12.26h-.78v1.49h.78Zm-15-1V11.22H4.41v1.51h.78Zm15-2V9.26h-.78v1.51h.78Zm-15-1V8.17H4.41V9.74h.78Zm15-2V6.28h-.78V7.77h.78Zm-15-1.11V5.33L4.48,5.1a.77.77,0,0,0-.07.27,2.72,2.72,0,0,0,0,.28v1h.79ZM19.21,5l.63-.4A1.62,1.62,0,0,0,19.16,4a1.94,1.94,0,0,0-.91-.22v.78a1.31,1.31,0,0,1,.56.12.88.88,0,0,1,.4.36ZM6,4.54H7.78V3.76H6a.82.82,0,0,0-.28.06l.12.35c.07.21.1.33.11.36Zm10.8,0V3.76H15.28v.78h1.49Zm-3,0V3.76H12.28v.78h1.49Zm-3,0V3.76H9.28v.78h1.51ZM6,10.84h12.6V6.91H6Z" transform="translate(-4.4 -3.76)"/></g></svg>',
|
|
@@ -202,6 +204,19 @@ export default {
|
|
|
202
204
|
alert_outline:
|
|
203
205
|
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z" /></svg>',
|
|
204
206
|
// More icons
|
|
207
|
+
more_media:
|
|
208
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 13V5C9 3.9 9.9 3 11 3H20C21.1 3 22 3.9 22 5V11H18.57L17.29 9.26C17.23 9.17 17.11 9.17 17.05 9.26L15.06 12C15 12.06 14.88 12.07 14.82 12L13.39 10.25C13.33 10.18 13.22 10.18 13.16 10.25L11.05 12.91C10.97 13 11.04 13.15 11.16 13.15H17.5V15H11C9.89 15 9 14.11 9 13M6 22V21H4V22H2V2H4V3H6V2H8.39C7.54 2.74 7 3.8 7 5V13C7 15.21 8.79 17 11 17H15.7C14.67 17.83 14 19.08 14 20.5C14 21.03 14.11 21.53 14.28 22H6M4 7H6V5H4V7M4 11H6V9H4V11M4 15H6V13H4V15M6 19V17H4V19H6M23 13V15H21V20.5C21 21.88 19.88 23 18.5 23S16 21.88 16 20.5 17.12 18 18.5 18C18.86 18 19.19 18.07 19.5 18.21V13H23Z" /></svg>',
|
|
209
|
+
more_gallery:
|
|
210
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 6V20H18V22H3C2.4 22 2 21.6 2 21V6H4M8 2H20C21.11 2 22 2.9 22 4V16C22 17.11 21.11 18 20 18H8C6.9 18 6 17.11 6 16V4C6 2.9 6.9 2 8 2M16.3 13.3L15.9 10.7L17.8 8.8L15.2 8.4L14 6L12.8 8.4L10.2 8.8L12.1 10.6L11.6 13.2L14 12L16.3 13.3Z" /></svg>',
|
|
211
|
+
more_folder:
|
|
212
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2 20V6H0V20C0 21.1 .9 22 2 22H20V20H2M22 4H14L12 2H6C5.6 2 5.2 2.1 4.9 2.3L4.3 2.9C4.1 3.2 4 3.6 4 4V16C4 16.4 4.1 16.8 4.3 17.1C4.4 17.2 4.5 17.3 4.5 17.4C5 17.8 5.5 18 6 18H22C23.1 18 24 17.1 24 16V6C24 4.9 23.1 4 22 4M22 12H19V15H17V12H14V10H17V7H19V10H22V12Z" /></svg>',
|
|
213
|
+
more_list:
|
|
214
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 14V17H14V19H17V22H19V19H22V17H19V14M20 11V12.3C19.4 12.1 18.7 12 18 12C16.8 12 15.6 12.4 14.7 13H7V11H20M12.1 17H7V15H12.8C12.5 15.6 12.2 16.3 12.1 17M7 7H20V9H7V7M5 19H7V21H3V3H7V5H5V19Z" /></svg>',
|
|
215
|
+
more_file:
|
|
216
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V8L14 2M18 20H6V4H13V9H18V20M9.5 18L10.2 15.2L8 13.3L10.9 13.1L12 10.4L13.1 13L16 13.2L13.8 15.1L14.5 17.9L12 16.5L9.5 18Z" /></svg>',
|
|
217
|
+
more_view: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 21H11V13H3M5 15H9V19H5M3 11H11V3H3M5 5H9V9H5M13 3V11H21V3M19 9H15V5H19M18 16H21V18H18V21H16V18H13V16H16V13H18Z" /></svg>',
|
|
218
|
+
more_page:
|
|
219
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M22,3H5A2,2 0 0,0 3,5V9H5V5H22V19H5V15H3V19A2,2 0 0,0 5,21H22A2,2 0 0,0 24,19V5A2,2 0 0,0 22,3M7,15V13H0V11H7V9L11,12L7,15M20,13H13V11H20V13M20,9H13V7H20V9M17,17H13V15H17V17Z" /></svg>',
|
|
205
220
|
more_text:
|
|
206
221
|
'<svg class="se-ci" xmlns="http://www.w3.org/2000/svg" viewBox="10 10 180 180"><g><path d="M49.711,142.188h49.027c2.328,0.002,4.394,1.492,5.129,3.699l9.742,29.252c0.363,1.092,1.385,1.828,2.537,1.83l15.883,0.01c0.859,0,1.667-0.412,2.17-1.109s0.641-1.594,0.37-2.41l-16.625-50.045L86.503,28.953c-0.36-1.097-1.383-1.839-2.537-1.842H64.532c-1.153-0.001-2.178,0.736-2.542,1.831L13.847,173.457c-0.271,0.816-0.135,1.713,0.369,2.412c0.503,0.697,1.311,1.109,2.171,1.109h15.872c1.151,0,2.173-0.736,2.537-1.828l9.793-29.287C45.325,143.66,47.39,142.18,49.711,142.188L49.711,142.188z M53.493,119.098l15.607-46.9c0.744-2.196,2.806-3.674,5.125-3.674s4.381,1.478,5.125,3.674l15.607,46.904c0.537,1.621,0.263,3.402-0.736,4.789c-1.018,1.408-2.649,2.24-4.386,2.24H58.615c-1.736,0-3.368-0.832-4.386-2.24C53.23,122.504,52.956,120.721,53.493,119.098L53.493,119.098z M190.465,63.32c0-2.919-1.015-5.396-3.059-7.428c-2.029-2.031-4.496-3.047-7.383-3.047c-2.889,0-5.355,1.016-7.388,3.047c-2.029,2.032-3.056,4.498-3.056,7.386c0,2.889,1.026,5.354,3.056,7.385c2.032,2.032,4.499,3.059,7.388,3.059c2.887,0,5.354-1.026,7.383-3.059C189.45,68.633,190.465,66.178,190.465,63.32L190.465,63.32z M190.465,101.994c0-2.858-1.015-5.313-3.059-7.333c-2.029-2.042-4.496-3.047-7.383-3.047c-2.889,0-5.355,1.005-7.388,3.047c-2.029,2.021-3.056,4.486-3.056,7.376c0,2.887,1.026,5.352,3.056,7.395c2.032,2.021,4.499,3.047,7.388,3.047c2.887,0,5.354-1.025,7.383-3.047C189.45,107.389,190.465,104.914,190.465,101.994L190.465,101.994z M190.465,140.76c0-2.918-1.015-5.395-3.059-7.438c-2.029-2.041-4.496-3.047-7.383-3.047c-2.889,0-5.355,1.006-7.388,3.047c-2.029,2.043-3.056,4.52-3.056,7.438c0,2.922,1.026,5.398,3.056,7.439c2.032,2.021,4.499,3.047,7.388,3.047c2.887,0,5.354-1.025,7.383-3.047C189.45,146.158,190.465,143.682,190.465,140.76L190.465,140.76z"/></g></svg>',
|
|
207
222
|
more_paragraph:
|
|
@@ -20,11 +20,9 @@
|
|
|
20
20
|
line-height: var(--se-edit-line-height);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.sun-editor-editable.se-type-document-editable
|
|
24
|
-
padding: var(--se-edit-inner-padding-doc-type);
|
|
25
|
-
}
|
|
23
|
+
.sun-editor-editable.se-type-document-editable-a4,
|
|
26
24
|
.sun-editor-editable.se-document-page-mirror-a4 {
|
|
27
|
-
width: 21cm;
|
|
25
|
+
width: 21cm !important;
|
|
28
26
|
padding: var(--se-edit-inner-padding-doc-type);
|
|
29
27
|
}
|
|
30
28
|
|
|
@@ -39,7 +37,7 @@
|
|
|
39
37
|
direction: initial;
|
|
40
38
|
}
|
|
41
39
|
.sun-editor-editable .se-component > figure > * {
|
|
42
|
-
margin: 0
|
|
40
|
+
margin: 0;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
/** component - figure - embed(blockquote) loading */
|
|
@@ -486,6 +484,7 @@
|
|
|
486
484
|
background-clip: padding-box;
|
|
487
485
|
background-color: inherit;
|
|
488
486
|
vertical-align: middle;
|
|
487
|
+
min-width: 2em;
|
|
489
488
|
}
|
|
490
489
|
|
|
491
490
|
/** table style class */
|
|
@@ -606,15 +605,17 @@
|
|
|
606
605
|
margin: 0 0 10px;
|
|
607
606
|
}
|
|
608
607
|
|
|
608
|
+
.sun-editor-editable figure.se-flex-component {
|
|
609
|
+
width: max-content;
|
|
610
|
+
}
|
|
611
|
+
|
|
609
612
|
.sun-editor-editable .se-inline-component {
|
|
610
613
|
display: inline-block;
|
|
611
614
|
width: auto;
|
|
612
615
|
min-width: -webkit-min-content;
|
|
613
616
|
min-width: -moz-min-content;
|
|
614
617
|
min-width: min-content;
|
|
615
|
-
max-width:
|
|
616
|
-
max-width: -moz-max-content;
|
|
617
|
-
max-width: max-content;
|
|
618
|
+
max-width: 100%;
|
|
618
619
|
margin: 0;
|
|
619
620
|
padding: 0;
|
|
620
621
|
}
|
package/src/assets/suneditor.css
CHANGED
|
@@ -251,10 +251,6 @@
|
|
|
251
251
|
border-width: 1px;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
.sun-editor .se-btn.se-btn-info {
|
|
255
|
-
color: var(--se-active-color);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
254
|
.sun-editor .se-btn:not(.on):not(.active):enabled:hover,
|
|
259
255
|
.sun-editor .se-btn:not(.on):not(.active):enabled:focus {
|
|
260
256
|
color: var(--se-hover-color);
|
|
@@ -279,7 +275,7 @@
|
|
|
279
275
|
.sun-editor .se-menu-list li:hover .se-btn-input input:enabled {
|
|
280
276
|
border-width: 1px;
|
|
281
277
|
border-style: solid;
|
|
282
|
-
border-color: var(--se-hover-
|
|
278
|
+
border-color: var(--se-hover-dark-color);
|
|
283
279
|
}
|
|
284
280
|
|
|
285
281
|
/* after, before button - on, active */
|
|
@@ -289,7 +285,7 @@
|
|
|
289
285
|
.sun-editor .se-menu-list li .se-side-btn-before.active:enabled,
|
|
290
286
|
.sun-editor .se-menu-list li .se-btn-input.on input:enabled,
|
|
291
287
|
.sun-editor .se-menu-list li .se-btn-input.active input:enabled {
|
|
292
|
-
border-color: var(--se-active-
|
|
288
|
+
border-color: var(--se-active-dark3-color);
|
|
293
289
|
}
|
|
294
290
|
|
|
295
291
|
/* after, before button : hover - on, active - border */
|
|
@@ -366,6 +362,7 @@
|
|
|
366
362
|
outline: 1px solid var(--se-active-dark5-color) !important;
|
|
367
363
|
box-shadow: 0 0 0 0.3rem var(--se-active-light5-color);
|
|
368
364
|
transition: box-shadow 0.1s ease-in-out;
|
|
365
|
+
z-index: 1;
|
|
369
366
|
}
|
|
370
367
|
|
|
371
368
|
/** --- primary button */
|
|
@@ -723,15 +720,15 @@
|
|
|
723
720
|
display: block;
|
|
724
721
|
width: 0;
|
|
725
722
|
height: 0;
|
|
726
|
-
border:
|
|
723
|
+
border: 12px solid transparent;
|
|
727
724
|
margin-right: 0;
|
|
728
|
-
margin-left: -
|
|
725
|
+
margin-left: -12px;
|
|
729
726
|
}
|
|
730
727
|
|
|
731
728
|
.sun-editor .se-controller .se-arrow {
|
|
732
729
|
left: 20px;
|
|
733
730
|
right: auto;
|
|
734
|
-
margin-left: -
|
|
731
|
+
margin-left: -12px;
|
|
735
732
|
margin-right: 0;
|
|
736
733
|
}
|
|
737
734
|
|
|
@@ -760,7 +757,7 @@
|
|
|
760
757
|
top: -12px;
|
|
761
758
|
content: ' ';
|
|
762
759
|
border-bottom-width: 0;
|
|
763
|
-
border-top-color: var(--se-
|
|
760
|
+
border-top-color: var(--se-controller-background-color);
|
|
764
761
|
}
|
|
765
762
|
|
|
766
763
|
/** --- container */
|
|
@@ -778,9 +775,7 @@
|
|
|
778
775
|
height: 100%;
|
|
779
776
|
top: 0;
|
|
780
777
|
left: 0;
|
|
781
|
-
background-color:
|
|
782
|
-
opacity: 0.7;
|
|
783
|
-
filter: alpha(opacity=70);
|
|
778
|
+
background-color: transparent;
|
|
784
779
|
z-index: 2147483647;
|
|
785
780
|
}
|
|
786
781
|
|
|
@@ -873,7 +868,7 @@
|
|
|
873
868
|
.sun-editor .se-toolbar.se-toolbar-balloon {
|
|
874
869
|
display: none;
|
|
875
870
|
position: absolute;
|
|
876
|
-
z-index:
|
|
871
|
+
z-index: 2147483646;
|
|
877
872
|
width: auto;
|
|
878
873
|
box-shadow: 0 3px 9px var(--se-shadow-layer-color);
|
|
879
874
|
-webkit-box-shadow: 0 3px 9px var(--se-shadow-layer-color);
|
|
@@ -1062,7 +1057,7 @@
|
|
|
1062
1057
|
left: 0px;
|
|
1063
1058
|
width: 100%;
|
|
1064
1059
|
height: 0px;
|
|
1065
|
-
z-index:
|
|
1060
|
+
z-index: 2147483646;
|
|
1066
1061
|
}
|
|
1067
1062
|
|
|
1068
1063
|
/** --- dropdown layer ---------------------------------------------------------- */
|
|
@@ -1276,8 +1271,13 @@
|
|
|
1276
1271
|
border-radius: var(--se-border-radius);
|
|
1277
1272
|
}
|
|
1278
1273
|
|
|
1274
|
+
.sun-editor-editable[contenteditable='true'],
|
|
1275
|
+
.sun-editor-editable[contenteditable='true'] * {
|
|
1276
|
+
scroll-margin: var(--se-edit-scroll-margin);
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
1279
|
.sun-editor-editable[contenteditable='true'].se-copy-format-cursor {
|
|
1280
|
-
cursor: url('data:image/svg+xml;base64,
|
|
1280
|
+
cursor: url('data:image/svg+xml;base64,PHN2ZwogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB3aWR0aD0iMjQiCiAgaGVpZ2h0PSIxNiIKICB2aWV3Qm94PSIwIDAgMjQgMTYiCj4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9IndoaXRlLW91dGxpbmUiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CiAgICAgIDxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImRpbGF0ZWQiIG9wZXJhdG9yPSJkaWxhdGUiIHJhZGl1cz0iMSIvPgogICAgICA8ZmVGbG9vZCBmbG9vZC1jb2xvcj0id2hpdGUiIHJlc3VsdD0id2hpdGUiLz4KICAgICAgPGZlQ29tcG9zaXRlIGluPSJ3aGl0ZSIgaW4yPSJkaWxhdGVkIiBvcGVyYXRvcj0iaW4iIHJlc3VsdD0ib3V0bGluZSIvPgogICAgICA8ZmVNZXJnZT4KICAgICAgICA8ZmVNZXJnZU5vZGUgaW49Im91dGxpbmUiLz4KICAgICAgICA8ZmVNZXJnZU5vZGUgaW49IlNvdXJjZUdyYXBoaWMiLz4KICAgICAgPC9mZU1lcmdlPgogICAgPC9maWx0ZXI+CiAgPC9kZWZzPgogIDxnIGZpbHRlcj0idXJsKCN3aGl0ZS1vdXRsaW5lKSI+CiAgICA8cGF0aAogICAgICBkPSJNNC4zMzIgMTIuNjY4CiAgICAgICAgIEM0LjMzMiAxMy4wMzUgNC40ODQgMTMuMzMyIDQuNjY4IDEzLjMzMgogICAgICAgICBMNS4zMzIgMTMuMzMyCiAgICAgICAgIEw1LjMzMiAxNC42NjgKICAgICAgICAgTDQuNSAxNC42NjgKICAgICAgICAgQzQuMzE2IDE0LjY2OCA0IDE0LjM2NyA0IDE0CiAgICAgICAgIEM0IDE0LjM2NyAzLjY4NCAxNC42NjggMy41IDE0LjY2OAogICAgICAgICBMMi42NjggMTQuNjY4CiAgICAgICAgIEwyLjY2OCAxMy4zMzIKICAgICAgICAgTDMuMzMyIDEzLjMzMgogICAgICAgICBDMy41MTYgMTMuMzMyIDMuNjY4IDEzLjAzNSAzLjY2OCAxMi42NjgKICAgICAgICAgTDMuNjY4IDMuMzMyCiAgICAgICAgIEMzLjY2OCAyLjk2NSAzLjUxNiAyLjY2OCAzLjMzMiAyLjY2OAogICAgICAgICBMMi42NjggMi42NjgKICAgICAgICAgTDIuNjY4IDEuMzMyCiAgICAgICAgIEwzLjUgMS4zMzIKICAgICAgICAgQzMuNjg0IDEuMzMyIDQgMS42MzMgNCAyCiAgICAgICAgIEM0IDEuNjMzIDQuMzE2IDEuMzMyIDQuNSAxLjMzMgogICAgICAgICBMNS4zMzIgMS4zMzIKICAgICAgICAgTDUuMzMyIDIuNjY4CiAgICAgICAgIEw0LjY2OCAyLjY2OAogICAgICAgICBDNC40ODQgMi42NjggNC4zMzIgMi45NjUgNC4zMzIgMy4zMzIKICAgICAgICAgWiIKICAgICAgZmlsbD0iYmxhY2siCiAgICAvPgogICAgPHBhdGgKICAgICAgZD0iTTIwIDIuNjY4CiAgICAgICAgIEwyMCAyCiAgICAgICAgIEMyMCAxLjYzMyAxOS43MDMgMS4zMzIgMTkuMzMyIDEuMzMyCiAgICAgICAgIEwxMS4zMzIgMS4zMzIKICAgICAgICAgQzEwLjk2NSAxLjMzMiAxMC42NjggMS42MzMgMTAuNjY4IDIKICAgICAgICAgTDEwLjY2OCA0LjY2OAogICAgICAgICBDMTAuNjY4IDUuMDM1IDEwLjk2NSA1LjMzMiAxMS4zMzIgNS4zMzIKICAgICAgICAgTDE5LjMzMiA1LjMzMgogICAgICAgICBDMTkuNzAzIDUuMzMyIDIwIDUuMDM1IDIwIDQuNjY4CiAgICAgICAgIEwyMCA0CiAgICAgICAgIEwyMC42NjggNAogICAgICAgICBMMjAuNjY4IDYuNjY4CiAgICAgICAgIEwxNCA2LjY2OAogICAgICAgICBMMTQgMTQKICAgICAgICAgQzE0IDE0LjM2NyAxNC4yOTcgMTQuNjY4IDE0LjY2OCAxNC42NjgKICAgICAgICAgTDE2IDE0LjY2OAogICAgICAgICBDMTYuMzY3IDE0LjY2OCAxNi42NjggMTQuMzY3IDE2LjY2OCAxNAogICAgICAgICBMMTYuNjY4IDgKICAgICAgICAgTDIyIDgKICAgICAgICAgTDIyIDIuNjY4CiAgICAgICAgIFoiCiAgICAgIGZpbGw9ImJsYWNrIgogICAgLz4KICA8L2c+Cjwvc3ZnPgo=')
|
|
1281
1281
|
0 8,
|
|
1282
1282
|
text;
|
|
1283
1283
|
}
|
|
@@ -1311,9 +1311,9 @@
|
|
|
1311
1311
|
.sun-editor .se-table-resize-line {
|
|
1312
1312
|
position: absolute;
|
|
1313
1313
|
top: 0;
|
|
1314
|
-
width:
|
|
1314
|
+
width: 6px;
|
|
1315
1315
|
height: 100%;
|
|
1316
|
-
margin-left: -
|
|
1316
|
+
margin-left: -3px;
|
|
1317
1317
|
background-color: var(--se-active-dark-color);
|
|
1318
1318
|
opacity: 0.4;
|
|
1319
1319
|
pointer-events: none;
|
|
@@ -1325,7 +1325,7 @@
|
|
|
1325
1325
|
position: absolute;
|
|
1326
1326
|
left: 0;
|
|
1327
1327
|
width: 100%;
|
|
1328
|
-
height:
|
|
1328
|
+
height: 6px;
|
|
1329
1329
|
margin-top: -3px;
|
|
1330
1330
|
background-color: var(--se-active-dark-color);
|
|
1331
1331
|
opacity: 0.4;
|
|
@@ -1654,6 +1654,9 @@
|
|
|
1654
1654
|
.sun-editor .se-wrapper .se-code-wrapper {
|
|
1655
1655
|
width: 100%;
|
|
1656
1656
|
}
|
|
1657
|
+
.sun-editor .se-wrapper .se-code-wrapper > div {
|
|
1658
|
+
width: 100%;
|
|
1659
|
+
}
|
|
1657
1660
|
.sun-editor .se-wrapper .se-code-wrapper .se-code-view-line {
|
|
1658
1661
|
background-color: var(--se-code-view-color);
|
|
1659
1662
|
color: var(--se-code-view-background-color);
|
|
@@ -1788,7 +1791,7 @@
|
|
|
1788
1791
|
left: 0;
|
|
1789
1792
|
width: 100%;
|
|
1790
1793
|
height: 100%;
|
|
1791
|
-
z-index:
|
|
1794
|
+
z-index: 2147483646;
|
|
1792
1795
|
}
|
|
1793
1796
|
.sun-editor .se-modal-area.se-backdrop-show {
|
|
1794
1797
|
display: block;
|
|
@@ -2779,7 +2782,7 @@
|
|
|
2779
2782
|
min-width: auto;
|
|
2780
2783
|
top: 0px;
|
|
2781
2784
|
left: 0px;
|
|
2782
|
-
z-index:
|
|
2785
|
+
z-index: 2147483646;
|
|
2783
2786
|
display: none;
|
|
2784
2787
|
width: -webkit-max-content;
|
|
2785
2788
|
width: -moz-max-content;
|
|
@@ -2871,7 +2874,7 @@
|
|
|
2871
2874
|
left: 0;
|
|
2872
2875
|
width: 100%;
|
|
2873
2876
|
height: 100%;
|
|
2874
|
-
z-index:
|
|
2877
|
+
z-index: 2147483646;
|
|
2875
2878
|
}
|
|
2876
2879
|
|
|
2877
2880
|
.sun-editor .se-browser label,
|
|
@@ -3318,7 +3321,7 @@
|
|
|
3318
3321
|
left: 0;
|
|
3319
3322
|
width: 100%;
|
|
3320
3323
|
height: 100%;
|
|
3321
|
-
z-index:
|
|
3324
|
+
z-index: 2147483646;
|
|
3322
3325
|
pointer-events: none;
|
|
3323
3326
|
}
|
|
3324
3327
|
|
|
@@ -3811,7 +3814,7 @@
|
|
|
3811
3814
|
}
|
|
3812
3815
|
|
|
3813
3816
|
.sun-editor-editable.se-rtl[contenteditable='true'].se-copy-format-cursor {
|
|
3814
|
-
cursor: url('data:image/svg+xml;base64,
|
|
3817
|
+
cursor: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDE2Ij4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9IndoaXRlLW91dGxpbmUiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CiAgICAgIDxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImRpbGF0ZWQiIG9wZXJhdG9yPSJkaWxhdGUiIHJhZGl1cz0iMSIvPgogICAgICA8ZmVGbG9vZCBmbG9vZC1jb2xvcj0id2hpdGUiIHJlc3VsdD0id2hpdGUiLz4KICAgICAgPGZlQ29tcG9zaXRlIGluPSJ3aGl0ZSIgaW4yPSJkaWxhdGVkIiBvcGVyYXRvcj0iaW4iIHJlc3VsdD0ib3V0bGluZSIvPgogICAgICA8ZmVNZXJnZT4KICAgICAgICA8ZmVNZXJnZU5vZGUgaW49Im91dGxpbmUiLz4KICAgICAgICA8ZmVNZXJnZU5vZGUgaW49IlNvdXJjZUdyYXBoaWMiLz4KICAgICAgPC9mZU1lcmdlPgogICAgPC9maWx0ZXI+CiAgPC9kZWZzPgogIDxnIGZpbHRlcj0idXJsKCN3aGl0ZS1vdXRsaW5lKSIgdHJhbnNmb3JtPSJzY2FsZSgtMSwxKSB0cmFuc2xhdGUoLTI0LDApIj4KICAgIDxwYXRoCiAgICAgIGQ9Ik00LjMzMiAxMi42NjgKICAgICAgICAgQzQuMzMyIDEzLjAzNSA0LjQ4NCAxMy4zMzIgNC42NjggMTMuMzMyCiAgICAgICAgIEw1LjMzMiAxMy4zMzIKICAgICAgICAgTDUuMzMyIDE0LjY2OAogICAgICAgICBMNC41IDE0LjY2OAogICAgICAgICBDNC4zMTYgMTQuNjY4IDQgMTQuMzY3IDQgMTQKICAgICAgICAgQzQgMTQuMzY3IDMuNjg0IDE0LjY2OCAzLjUgMTQuNjY4CiAgICAgICAgIEwyLjY2OCAxNC42NjgKICAgICAgICAgTDIuNjY4IDEzLjMzMgogICAgICAgICBMMy4zMzIgMTMuMzMyCiAgICAgICAgIEMzLjUxNiAxMy4zMzIgMy42NjggMTMuMDM1IDMuNjY4IDEyLjY2OAogICAgICAgICBMMy42NjggMy4zMzIKICAgICAgICAgQzMuNjY4IDIuOTY1IDMuNTE2IDIuNjY4IDMuMzMyIDIuNjY4CiAgICAgICAgIEwyLjY2OCAyLjY2OAogICAgICAgICBMMi42NjggMS4zMzIKICAgICAgICAgTDMuNSAxLjMzMgogICAgICAgICBDMy42ODQgMS4zMzIgNCAxLjYzMyA0IDIKICAgICAgICAgQzQgMS42MzMgNC4zMTYgMS4zMzIgNC41IDEuMzMyCiAgICAgICAgIEw1LjMzMiAxLjMzMgogICAgICAgICBMNS4zMzIgMi42NjgKICAgICAgICAgTDQuNjY4IDIuNjY4CiAgICAgICAgIEM0LjQ4NCAyLjY2OCA0LjMzMiAyLjk2NSA0LjMzMiAzLjMzMgogICAgICAgICBaIgogICAgICBmaWxsPSJibGFjayIKICAgIC8+CiAgICA8cGF0aAogICAgICBkPSJNMjAgMi42NjgKICAgICAgICAgTDIwIDIKICAgICAgICAgQzIwIDEuNjMzIDE5LjcwMyAxLjMzMiAxOS4zMzIgMS4zMzIKICAgICAgICAgTDExLjMzMiAxLjMzMgogICAgICAgICBDMTAuOTY1IDEuMzMyIDEwLjY2OCAxLjYzMyAxMC42NjggMgogICAgICAgICBMMTAuNjY4IDQuNjY4CiAgICAgICAgIEMxMC42NjggNS4wMzUgMTAuOTY1IDUuMzMyIDExLjMzMiA1LjMzMgogICAgICAgICBMMTkuMzMyIDUuMzMyCiAgICAgICAgIEMxOS43MDMgNS4zMzIgMjAgNS4wMzUgMjAgNC42NjgKICAgICAgICAgTDIwIDQKICAgICAgICAgTDIwLjY2OCA0CiAgICAgICAgIEwyMC42NjggNi42NjgKICAgICAgICAgTDE0IDYuNjY4CiAgICAgICAgIEwxNCAxNAogICAgICAgICBDMTQgMTQuMzY3IDE0LjI5NyAxNC42NjggMTQuNjY4IDE0LjY2OAogICAgICAgICBMMTYgMTQuNjY4CiAgICAgICAgIEMxNi4zNjcgMTQuNjY4IDE2LjY2OCAxNC4zNjcgMTYuNjY4IDE0CiAgICAgICAgIEwxNi42NjggOAogICAgICAgICBMMjIgOAogICAgICAgICBMMjIgMi42NjgKICAgICAgICAgWiIKICAgICAgZmlsbD0iYmxhY2siCiAgICAvPgogIDwvZz4KPC9zdmc+Cg==')
|
|
3815
3818
|
24 0,
|
|
3816
3819
|
text;
|
|
3817
3820
|
}
|
|
@@ -4036,7 +4039,7 @@
|
|
|
4036
4039
|
pointer-events: none;
|
|
4037
4040
|
width: 2px;
|
|
4038
4041
|
background-color: var(--se-active-dark5-color);
|
|
4039
|
-
z-index:
|
|
4042
|
+
z-index: 2147483646;
|
|
4040
4043
|
}
|
|
4041
4044
|
.sun-editor.sun-editor-carrier-wrapper .se-drag-cursor::before {
|
|
4042
4045
|
content: '';
|
|
@@ -4075,7 +4078,7 @@
|
|
|
4075
4078
|
clear: both;
|
|
4076
4079
|
width: 100%;
|
|
4077
4080
|
height: 24px;
|
|
4078
|
-
margin:
|
|
4081
|
+
margin: 0;
|
|
4079
4082
|
padding: 0;
|
|
4080
4083
|
z-index: 1;
|
|
4081
4084
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { dom, env, keyCodeMap } from '../../helper';
|
|
2
|
+
import { isTable, isList } from '../../helper/dom/domCheck';
|
|
2
3
|
const { NO_EVENT } = env;
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -39,12 +40,11 @@ const __RemoveCopyformt = function (ww, button) {
|
|
|
39
40
|
*/
|
|
40
41
|
const __findFirstAndLast = function (selectArea) {
|
|
41
42
|
const isContentLess = dom.check.isContentLess;
|
|
42
|
-
const isTable = dom.check.isTable;
|
|
43
43
|
const first =
|
|
44
44
|
dom.query.getEdgeChild(
|
|
45
45
|
dom.query.getEdgeChild(selectArea, (current) => !isContentLess(current), false),
|
|
46
46
|
(current) => {
|
|
47
|
-
return current.childNodes.length === 0 || current.nodeType === 3 || isTable(current);
|
|
47
|
+
return current.childNodes.length === 0 || current.nodeType === 3 || isTable(current) || isList(current);
|
|
48
48
|
},
|
|
49
49
|
false
|
|
50
50
|
) || selectArea.firstChild;
|
|
@@ -52,7 +52,7 @@ const __findFirstAndLast = function (selectArea) {
|
|
|
52
52
|
dom.query.getEdgeChild(
|
|
53
53
|
selectArea.lastChild,
|
|
54
54
|
(current) => {
|
|
55
|
-
return current.childNodes.length === 0 || current.nodeType === 3 || isTable(current);
|
|
55
|
+
return current.childNodes.length === 0 || current.nodeType === 3 || isTable(current) || isList(current);
|
|
56
56
|
},
|
|
57
57
|
true
|
|
58
58
|
) || selectArea.lastChild;
|
|
@@ -89,9 +89,17 @@ export function SELECT_ALL(editor) {
|
|
|
89
89
|
const scopeSelectionTags = editor.options.get('scopeSelectionTags');
|
|
90
90
|
const range = editor.selection.getRange();
|
|
91
91
|
if (!range.collapsed) {
|
|
92
|
-
let commonNode = range.commonAncestorContainer;
|
|
93
|
-
let commonNodeName = commonNode.nodeName?.toLowerCase();
|
|
92
|
+
let commonNode = (prevScopeTag = range.commonAncestorContainer);
|
|
93
|
+
let commonNodeName = (prevScopeTagName = commonNode.nodeName?.toLowerCase());
|
|
94
|
+
if (range.startOffset === 0 && range.endOffset === range.endContainer.textContent?.length) {
|
|
95
|
+
const commonParent = commonNode.parentElement;
|
|
96
|
+
if ((dom.check.isList(commonParent) || dom.check.isListCell(commonParent)) && commonParent.firstChild.contains?.(range.startContainer) && commonParent.lastChild?.contains(range.endContainer)) {
|
|
97
|
+
prevScopeTag = commonNode = commonParent.parentElement;
|
|
98
|
+
prevScopeTagName = commonNode.nodeName?.toLowerCase();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
94
101
|
|
|
102
|
+
commonNodeName = commonNode.nodeName?.toLowerCase();
|
|
95
103
|
while (commonNode && ((!commonNode.nextSibling && !commonNode.previousSibling && !scopeSelectionTags.includes(commonNodeName)) || dom.check.isContentLess(commonNodeName)) && commonNode !== ww) {
|
|
96
104
|
commonNode = commonNode.parentElement;
|
|
97
105
|
commonNodeName = commonNode.nodeName?.toLowerCase();
|
|
@@ -121,7 +129,8 @@ export function SELECT_ALL(editor) {
|
|
|
121
129
|
if (!first || !last) return;
|
|
122
130
|
|
|
123
131
|
let info = null;
|
|
124
|
-
if (dom.check.isMedia(first) || (info = editor.component.get(first
|
|
132
|
+
if (dom.check.isMedia(first) || (info = editor.component.get(first)) || dom.check.isTableElements(first)) {
|
|
133
|
+
info ||= editor.component.get(first);
|
|
125
134
|
const br = dom.utils.createElement('BR');
|
|
126
135
|
const format = dom.utils.createElement(editor.options.get('defaultLine'), null, br);
|
|
127
136
|
first = info ? info.container || info.cover : first;
|
|
@@ -129,7 +138,8 @@ export function SELECT_ALL(editor) {
|
|
|
129
138
|
first = br;
|
|
130
139
|
}
|
|
131
140
|
|
|
132
|
-
if (dom.check.isMedia(last) || (info = editor.component.get(last
|
|
141
|
+
if (dom.check.isMedia(last) || (info = editor.component.get(last)) || dom.check.isTableElements(last)) {
|
|
142
|
+
info ||= editor.component.get(last);
|
|
133
143
|
const br = dom.utils.createElement('BR');
|
|
134
144
|
const format = dom.utils.createElement(editor.options.get('defaultLine'), null, br);
|
|
135
145
|
last = info ? info.container || info.cover : last;
|
|
@@ -154,9 +164,7 @@ export function DIR_BTN_ACTIVE(editor, rtl) {
|
|
|
154
164
|
editor.reverseKeys.forEach((e) => {
|
|
155
165
|
const info = shortcutsKeyMap.get(e);
|
|
156
166
|
if (!info) return;
|
|
157
|
-
|
|
158
|
-
info.c = info.r;
|
|
159
|
-
info.r = temp;
|
|
167
|
+
[info.command, info.r] = [info.r, info.command];
|
|
160
168
|
});
|
|
161
169
|
|
|
162
170
|
// change dir buttons
|
|
@@ -249,7 +257,7 @@ export function FONT_STYLE(editor, command) {
|
|
|
249
257
|
nodeName = 'sub';
|
|
250
258
|
}
|
|
251
259
|
|
|
252
|
-
editor.
|
|
260
|
+
editor.inline.apply(el, { stylesToModify: StyleMap[command] || null, nodesToRemove: [nodeName], strictRemove: false });
|
|
253
261
|
editor.focus();
|
|
254
262
|
}
|
|
255
263
|
|
|
@@ -259,7 +267,7 @@ export function FONT_STYLE(editor, command) {
|
|
|
259
267
|
*/
|
|
260
268
|
export function PAGE_BREAK(editor) {
|
|
261
269
|
const pageBreak = dom.utils.createElement('DIV', { class: 'se-component se-component-line-break se-page-break' });
|
|
262
|
-
editor.component.insert(pageBreak, { skipCharCount: true,
|
|
270
|
+
editor.component.insert(pageBreak, { skipCharCount: true, insertBehavior: 'line' });
|
|
263
271
|
const line = pageBreak.nextElementSibling || editor.format.addLine(pageBreak);
|
|
264
272
|
editor.selection.setRange(line, 1, line, 1);
|
|
265
273
|
editor.history.push(false);
|