@syncfusion/ej2-richtexteditor 21.2.9 → 22.1.34
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/.eslintrc.json +1 -0
- package/CHANGELOG.md +30 -0
- package/dist/ej2-richtexteditor.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +1592 -196
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +1605 -199
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +2 -2
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/common/config.js +2 -2
- package/src/common/constant.d.ts +6 -0
- package/src/common/constant.js +6 -0
- package/src/common/interface.d.ts +2 -2
- package/src/common/util.js +2 -0
- package/src/editor-manager/base/editor-manager.d.ts +4 -3
- package/src/editor-manager/base/editor-manager.js +6 -1
- package/src/editor-manager/base/interface.d.ts +44 -9
- package/src/editor-manager/plugin/clearformat.d.ts +1 -0
- package/src/editor-manager/plugin/clearformat.js +1 -0
- package/src/editor-manager/plugin/dom-node.js +10 -6
- package/src/editor-manager/plugin/emoji-picker-action.d.ts +8 -0
- package/src/editor-manager/plugin/emoji-picker-action.js +62 -0
- package/src/editor-manager/plugin/format-painter-actions.d.ts +19 -36
- package/src/editor-manager/plugin/format-painter-actions.js +224 -81
- package/src/editor-manager/plugin/inserthtml.js +6 -1
- package/src/editor-manager/plugin/link.js +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +3 -0
- package/src/editor-manager/plugin/ms-word-clean-up.js +66 -14
- package/src/editor-manager/plugin/selection-commands.d.ts +2 -1
- package/src/editor-manager/plugin/selection-commands.js +48 -23
- package/src/editor-manager/plugin/table.js +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +6 -0
- package/src/editor-manager/plugin/undo.d.ts +1 -0
- package/src/editor-manager/plugin/undo.js +26 -5
- package/src/editor-manager/plugin.d.ts +1 -0
- package/src/editor-manager/plugin.js +1 -0
- package/src/global.js +1 -1
- package/src/rich-text-editor/actions/base-quick-toolbar.js +10 -3
- package/src/rich-text-editor/actions/base-toolbar.js +3 -2
- package/src/rich-text-editor/actions/emoji-picker.d.ts +48 -0
- package/src/rich-text-editor/actions/emoji-picker.js +778 -0
- package/src/rich-text-editor/actions/enter-key.js +2 -2
- package/src/rich-text-editor/actions/execute-command-callback.js +3 -1
- package/src/rich-text-editor/actions/file-manager.js +1 -0
- package/src/rich-text-editor/actions/format-painter.d.ts +2 -2
- package/src/rich-text-editor/actions/format-painter.js +11 -9
- package/src/rich-text-editor/actions/full-screen.js +6 -0
- package/src/rich-text-editor/actions/html-editor.js +17 -3
- package/src/rich-text-editor/actions/paste-clean-up.js +1 -0
- package/src/rich-text-editor/actions/resize.js +1 -1
- package/src/rich-text-editor/actions.d.ts +1 -0
- package/src/rich-text-editor/actions.js +1 -0
- package/src/rich-text-editor/base/constant.d.ts +10 -0
- package/src/rich-text-editor/base/constant.js +10 -0
- package/src/rich-text-editor/base/enum.d.ts +0 -4
- package/src/rich-text-editor/base/interface.d.ts +48 -6
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +13 -7
- package/src/rich-text-editor/base/rich-text-editor.d.ts +27 -7
- package/src/rich-text-editor/base/rich-text-editor.js +42 -12
- package/src/rich-text-editor/base/util.js +2 -2
- package/src/rich-text-editor/formatter/formatter.js +7 -5
- package/src/rich-text-editor/models/default-locale.js +14 -2
- package/src/rich-text-editor/models/items.d.ts +2 -1
- package/src/rich-text-editor/models/items.js +188 -1
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +212 -9
- package/src/rich-text-editor/models/toolbar-settings.d.ts +209 -11
- package/src/rich-text-editor/models/toolbar-settings.js +23 -6
- package/src/rich-text-editor/renderer/audio-module.js +3 -3
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +1 -1
- package/src/rich-text-editor/renderer/image-module.js +11 -6
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +2 -0
- package/src/rich-text-editor/renderer/toolbar-renderer.js +7 -2
- package/src/rich-text-editor/renderer/video-module.js +14 -9
- package/styles/bootstrap-dark.css +299 -137
- package/styles/bootstrap.css +305 -140
- package/styles/bootstrap4.css +304 -133
- package/styles/bootstrap5-dark.css +310 -165
- package/styles/bootstrap5.css +310 -165
- package/styles/fabric-dark.css +297 -136
- package/styles/fabric.css +294 -133
- package/styles/fluent-dark.css +311 -170
- package/styles/fluent.css +311 -170
- package/styles/highcontrast-light.css +289 -128
- package/styles/highcontrast.css +296 -135
- package/styles/material-dark.css +295 -129
- package/styles/material.css +300 -134
- package/styles/material3-dark.css +3082 -0
- package/styles/material3-dark.scss +3 -0
- package/styles/material3.css +3138 -0
- package/styles/material3.scss +3 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +54 -12
- package/styles/rich-text-editor/_bootstrap-definition.scss +57 -13
- package/styles/rich-text-editor/_bootstrap4-definition.scss +50 -7
- package/styles/rich-text-editor/_bootstrap5-definition.scss +56 -13
- package/styles/rich-text-editor/_fabric-dark-definition.scss +53 -10
- package/styles/rich-text-editor/_fabric-definition.scss +52 -9
- package/styles/rich-text-editor/_fluent-definition.scss +56 -15
- package/styles/rich-text-editor/_fusionnew-definition.scss +46 -4
- package/styles/rich-text-editor/_highcontrast-definition.scss +52 -9
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +48 -5
- package/styles/rich-text-editor/_layout.scss +280 -68
- package/styles/rich-text-editor/_material-dark-definition.scss +48 -5
- package/styles/rich-text-editor/_material-definition.scss +50 -6
- package/styles/rich-text-editor/_material3-dark-definition.scss +1 -0
- package/styles/rich-text-editor/_material3-definition.scss +262 -0
- package/styles/rich-text-editor/_tailwind-definition.scss +63 -23
- package/styles/rich-text-editor/_theme.scss +103 -19
- package/styles/rich-text-editor/bootstrap-dark.css +299 -137
- package/styles/rich-text-editor/bootstrap.css +305 -140
- package/styles/rich-text-editor/bootstrap4.css +304 -133
- package/styles/rich-text-editor/bootstrap5-dark.css +310 -165
- package/styles/rich-text-editor/bootstrap5.css +310 -165
- package/styles/rich-text-editor/fabric-dark.css +297 -136
- package/styles/rich-text-editor/fabric.css +294 -133
- package/styles/rich-text-editor/fluent-dark.css +311 -170
- package/styles/rich-text-editor/fluent.css +311 -170
- package/styles/rich-text-editor/highcontrast-light.css +289 -128
- package/styles/rich-text-editor/highcontrast.css +296 -135
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +1 -1
- package/styles/rich-text-editor/icons/_bootstrap.scss +1 -1
- package/styles/rich-text-editor/icons/_bootstrap4.scss +1 -1
- package/styles/rich-text-editor/icons/_bootstrap5.scss +1 -1
- package/styles/rich-text-editor/icons/_fabric-dark.scss +1 -1
- package/styles/rich-text-editor/icons/_fabric.scss +1 -1
- package/styles/rich-text-editor/icons/_fluent.scss +1 -1
- package/styles/rich-text-editor/icons/_fusionnew.scss +1 -1
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +1 -1
- package/styles/rich-text-editor/icons/_highcontrast.scss +1 -1
- package/styles/rich-text-editor/icons/_material-dark.scss +1 -1
- package/styles/rich-text-editor/icons/_material.scss +1 -1
- package/styles/rich-text-editor/icons/_material3-dark.scss +1 -0
- package/styles/rich-text-editor/icons/_material3.scss +1 -1
- package/styles/rich-text-editor/icons/_tailwind.scss +1 -1
- package/styles/rich-text-editor/material-dark.css +295 -129
- package/styles/rich-text-editor/material.css +300 -134
- package/styles/rich-text-editor/material3-dark.css +3082 -0
- package/styles/rich-text-editor/material3-dark.scss +5 -0
- package/styles/rich-text-editor/material3.css +3138 -0
- package/styles/rich-text-editor/material3.scss +5 -0
- package/styles/rich-text-editor/tailwind-dark.css +313 -157
- package/styles/rich-text-editor/tailwind.css +313 -157
- package/styles/tailwind-dark.css +313 -157
- package/styles/tailwind.css +313 -157
|
@@ -729,6 +729,16 @@ var formatPainterClick = 'formatPainterClick';
|
|
|
729
729
|
* @deprecated
|
|
730
730
|
*/
|
|
731
731
|
var formatPainterDoubleClick = 'formatPainterDoubleClick';
|
|
732
|
+
/**
|
|
733
|
+
* @hidden
|
|
734
|
+
* @deprecated
|
|
735
|
+
*/
|
|
736
|
+
var emojiPicker = 'emojiPicker';
|
|
737
|
+
/**
|
|
738
|
+
* @hidden
|
|
739
|
+
* @deprecated
|
|
740
|
+
*/
|
|
741
|
+
var maximizeMinimizeClick = 'maximizeMinimizeClick';
|
|
732
742
|
/**
|
|
733
743
|
* @hidden
|
|
734
744
|
* @deprecated
|
|
@@ -1963,6 +1973,13 @@ var tools = {
|
|
|
1963
1973
|
'tooltip': 'Format Painter',
|
|
1964
1974
|
'command': 'FormatPainter',
|
|
1965
1975
|
'subCommand': 'FormatPainter'
|
|
1976
|
+
},
|
|
1977
|
+
'emojipicker': {
|
|
1978
|
+
'id': 'EmojiPicker',
|
|
1979
|
+
'icon': 'e-emoji',
|
|
1980
|
+
'tooltip': 'Emoji Icon',
|
|
1981
|
+
'command': 'EmojiPicker',
|
|
1982
|
+
'subCommand': 'EmojiPicker'
|
|
1966
1983
|
}
|
|
1967
1984
|
};
|
|
1968
1985
|
var alignmentLocale = [
|
|
@@ -2175,8 +2192,188 @@ var windowKeys = {
|
|
|
2175
2192
|
'Clear Format': 'Ctrl + Shift + R',
|
|
2176
2193
|
'Numbered List': 'Ctrl + Shift + O',
|
|
2177
2194
|
'Bulleted List': 'Ctrl + Alt + O',
|
|
2178
|
-
'Format Painter': '
|
|
2195
|
+
'Format Painter': 'Alt + Shift + C, Alt + Shift + V'
|
|
2179
2196
|
};
|
|
2197
|
+
var defaultEmojiIcons = [{
|
|
2198
|
+
name: 'Smilies & People', code: '1F600', iconCss: 'e-emoji', icons: [{ code: '1F600', desc: 'Grinning face' },
|
|
2199
|
+
{ code: '1F603', desc: 'Grinning face with big eyes' },
|
|
2200
|
+
{ code: '1F604', desc: 'Grinning face with smiling eyes' },
|
|
2201
|
+
{ code: '1F606', desc: 'Grinning squinting face' },
|
|
2202
|
+
{ code: '1F605', desc: 'Grinning face with sweat' },
|
|
2203
|
+
{ code: '1F602', desc: 'Face with tears of joy' },
|
|
2204
|
+
{ code: '1F923', desc: 'Rolling on the floor laughing' },
|
|
2205
|
+
{ code: '1F60A', desc: 'Smiling face with smiling eyes' },
|
|
2206
|
+
{ code: '1F607', desc: 'Smiling face with halo' },
|
|
2207
|
+
{ code: '1F642', desc: 'Slightly smiling face' },
|
|
2208
|
+
{ code: '1F643', desc: 'Upside-down face' },
|
|
2209
|
+
{ code: '1F60D', desc: 'Smiling face with heart-eyes' },
|
|
2210
|
+
{ code: '1F618', desc: 'Face blowing a kiss' },
|
|
2211
|
+
{ code: '1F61B', desc: 'Face with tongue' },
|
|
2212
|
+
{ code: '1F61C', desc: 'Winking face with tongue' },
|
|
2213
|
+
{ code: '1F604', desc: 'Grinning face with smiling eyes' },
|
|
2214
|
+
{ code: '1F469', desc: 'Woman' },
|
|
2215
|
+
{ code: '1F468', desc: 'Man' },
|
|
2216
|
+
{ code: '1F467', desc: 'Girl' },
|
|
2217
|
+
{ code: '1F466', desc: 'Boy' },
|
|
2218
|
+
{ code: '1F476', desc: 'Baby' },
|
|
2219
|
+
{ code: '1F475', desc: 'Old woman' },
|
|
2220
|
+
{ code: '1F474', desc: 'Old man' },
|
|
2221
|
+
{ code: '1F46E', desc: 'Police officer' },
|
|
2222
|
+
{ code: '1F477', desc: 'Construction worker' },
|
|
2223
|
+
{ code: '1F482', desc: 'Guard' },
|
|
2224
|
+
{ code: '1F575', desc: 'Detective' },
|
|
2225
|
+
{ code: '1F9D1', desc: 'Cook' }]
|
|
2226
|
+
}, {
|
|
2227
|
+
name: 'Animals & Nature', code: '1F435', iconCss: 'e-animals', icons: [{ code: '1F436', desc: 'Dog face' },
|
|
2228
|
+
{ code: '1F431', desc: 'Cat face' },
|
|
2229
|
+
{ code: '1F42D', desc: 'Mouse face' },
|
|
2230
|
+
{ code: '1F439', desc: 'Hamster face' },
|
|
2231
|
+
{ code: '1F430', desc: 'Rabbit face' },
|
|
2232
|
+
{ code: '1F98A', desc: 'Fox face' },
|
|
2233
|
+
{ code: '1F43B', desc: 'Bear face' },
|
|
2234
|
+
{ code: '1F43C', desc: 'Panda face' },
|
|
2235
|
+
{ code: '1F428', desc: 'Koala' },
|
|
2236
|
+
{ code: '1F42F', desc: 'Tiger face' },
|
|
2237
|
+
{ code: '1F981', desc: 'Lion face' },
|
|
2238
|
+
{ code: '1F42E', desc: 'Cow face' },
|
|
2239
|
+
{ code: '1F437', desc: 'Pig face' },
|
|
2240
|
+
{ code: '1F43D', desc: 'Pig nose' },
|
|
2241
|
+
{ code: '1F438', desc: 'Frog face' },
|
|
2242
|
+
{ code: '1F435', desc: 'Monkey face' },
|
|
2243
|
+
{ code: '1F649', desc: 'Hear-no-evil monkey' },
|
|
2244
|
+
{ code: '1F64A', desc: 'Speak-no-evil monkey' },
|
|
2245
|
+
{ code: '1F412', desc: 'Monkey' },
|
|
2246
|
+
{ code: '1F414', desc: 'Chicken' },
|
|
2247
|
+
{ code: '1F427', desc: 'Penguin' },
|
|
2248
|
+
{ code: '1F426', desc: 'Bird' },
|
|
2249
|
+
{ code: '1F424', desc: 'Baby chick' },
|
|
2250
|
+
{ code: '1F986', desc: 'Duck' },
|
|
2251
|
+
{ code: '1F985', desc: 'Eagle' }]
|
|
2252
|
+
}, {
|
|
2253
|
+
name: 'Food & Drink', code: '1F347', iconCss: 'e-food-and-drinks', icons: [{ code: '1F34E', desc: 'Red apple' },
|
|
2254
|
+
{ code: '1F34C', desc: 'Banana' },
|
|
2255
|
+
{ code: '1F347', desc: 'Grapes' },
|
|
2256
|
+
{ code: '1F353', desc: 'Strawberry' },
|
|
2257
|
+
{ code: '1F35E', desc: 'Bread' },
|
|
2258
|
+
{ code: '1F950', desc: 'Croissant' },
|
|
2259
|
+
{ code: '1F955', desc: 'Carrot' },
|
|
2260
|
+
{ code: '1F354', desc: 'Hamburger' },
|
|
2261
|
+
{ code: '1F355', desc: 'Pizza' },
|
|
2262
|
+
{ code: '1F32D', desc: 'Hot dog' },
|
|
2263
|
+
{ code: '1F35F', desc: 'French fries' },
|
|
2264
|
+
{ code: '1F37F', desc: 'Popcorn' },
|
|
2265
|
+
{ code: '1F366', desc: 'Soft ice cream' },
|
|
2266
|
+
{ code: '1F367', desc: 'Shaved ice' },
|
|
2267
|
+
{ code: '1F36A', desc: 'Cookie' },
|
|
2268
|
+
{ code: '1F382', desc: 'Birthday cake' },
|
|
2269
|
+
{ code: '1F370', desc: 'Shortcake' },
|
|
2270
|
+
{ code: '1F36B', desc: 'Chocolate bar' },
|
|
2271
|
+
{ code: '1F369', desc: 'Donut' },
|
|
2272
|
+
{ code: '1F36E', desc: 'Custard' },
|
|
2273
|
+
{ code: '1F36D', desc: 'Lollipop' },
|
|
2274
|
+
{ code: '1F36C', desc: 'Candy' },
|
|
2275
|
+
{ code: '1F377', desc: 'Wine glass' },
|
|
2276
|
+
{ code: '1F37A', desc: 'Beer mug' },
|
|
2277
|
+
{ code: '1F37E', desc: 'Bottle with popping cork' }]
|
|
2278
|
+
}, {
|
|
2279
|
+
name: 'Activities', code: '1F383', iconCss: 'e-activities', icons: [{ code: '26BD', desc: 'Soccer ball' },
|
|
2280
|
+
{ code: '1F3C0', desc: 'Basketball' },
|
|
2281
|
+
{ code: '1F3C8', desc: 'American football' },
|
|
2282
|
+
{ code: '26BE', desc: 'Baseball' },
|
|
2283
|
+
{ code: '1F3BE', desc: 'Tennis' },
|
|
2284
|
+
{ code: '1F3D0', desc: 'Volleyball' },
|
|
2285
|
+
{ code: '1F3C9', desc: 'Rugby football' },
|
|
2286
|
+
{ code: '1F3B1', desc: 'Pool 8 ball' },
|
|
2287
|
+
{ code: '1F3D3', desc: 'Ping pong' },
|
|
2288
|
+
{ code: '1F3F8', desc: 'Badminton' },
|
|
2289
|
+
{ code: '1F94A', desc: 'Boxing glove' },
|
|
2290
|
+
{ code: '1F3CA', desc: 'Swimmer' },
|
|
2291
|
+
{ code: '1F3CB', desc: 'Weightlifter' },
|
|
2292
|
+
{ code: '1F6B4', desc: 'Bicyclist' },
|
|
2293
|
+
{ code: '1F6F9', desc: 'Skateboard' },
|
|
2294
|
+
{ code: '1F3AE', desc: 'Video game' },
|
|
2295
|
+
{ code: '1F579', desc: 'Joystick' },
|
|
2296
|
+
{ code: '1F3CF', desc: 'Cricket' },
|
|
2297
|
+
{ code: '1F3C7', desc: 'Horse racing' },
|
|
2298
|
+
{ code: '1F3AF', desc: 'Direct hit' },
|
|
2299
|
+
{ code: '1F3D1', desc: 'Field hockey' },
|
|
2300
|
+
{ code: '1F3B0', desc: 'Slot machine' },
|
|
2301
|
+
{ code: '1F3B3', desc: 'Bowling' },
|
|
2302
|
+
{ code: '1F3B2', desc: 'Game die' },
|
|
2303
|
+
{ code: '265F', desc: 'Chess pawn' }]
|
|
2304
|
+
}, {
|
|
2305
|
+
name: 'Travel & Places', code: '1F30D', iconCss: 'e-travel-and-places', icons: [{ code: '2708', desc: 'Airplane' },
|
|
2306
|
+
{ code: '1F697', desc: 'Automobile' },
|
|
2307
|
+
{ code: '1F695', desc: 'Taxi' },
|
|
2308
|
+
{ code: '1F6B2', desc: 'Bicycle' },
|
|
2309
|
+
{ code: '1F68C', desc: 'Bus' },
|
|
2310
|
+
{ code: '1F682', desc: 'Locomotive' },
|
|
2311
|
+
{ code: '1F6F3', desc: 'Passenger ship' },
|
|
2312
|
+
{ code: '1F680', desc: 'Rocket' },
|
|
2313
|
+
{ code: '1F681', desc: 'Helicopter' },
|
|
2314
|
+
{ code: '1F6A2', desc: 'Ship' },
|
|
2315
|
+
{ code: '1F3DF', desc: 'Stadium' },
|
|
2316
|
+
{ code: '1F54C', desc: 'Mosque' },
|
|
2317
|
+
{ code: '26EA', desc: 'Church' },
|
|
2318
|
+
{ code: '1F6D5', desc: 'Hindu Temple' },
|
|
2319
|
+
{ code: '1F3D4', desc: 'Snow-capped mountain' },
|
|
2320
|
+
{ code: '1F3EB', desc: 'School' },
|
|
2321
|
+
{ code: '1F30B', desc: 'Volcano' },
|
|
2322
|
+
{ code: '1F3D6', desc: 'Beach with umbrella' },
|
|
2323
|
+
{ code: '1F3DD', desc: 'Desert island' },
|
|
2324
|
+
{ code: '1F3DE', desc: 'National park' },
|
|
2325
|
+
{ code: '1F3F0', desc: 'Castle' },
|
|
2326
|
+
{ code: '1F5FC', desc: 'Tokyo tower' },
|
|
2327
|
+
{ code: '1F5FD', desc: 'Statue of liberty' },
|
|
2328
|
+
{ code: '26E9', desc: 'Shinto shrine' },
|
|
2329
|
+
{ code: '1F3EF', desc: 'Japanese castle' },
|
|
2330
|
+
{ code: '1F3A2', desc: 'Roller coaster' }]
|
|
2331
|
+
}, {
|
|
2332
|
+
name: 'Objects', code: '1F507', iconCss: 'e-objects', icons: [{ code: '1F4A1', desc: 'Light bulb' },
|
|
2333
|
+
{ code: '1F526', desc: 'Flashlight' },
|
|
2334
|
+
{ code: '1F4BB', desc: 'Laptop computer' },
|
|
2335
|
+
{ code: '1F5A5', desc: 'Desktop computer' },
|
|
2336
|
+
{ code: '1F5A8', desc: 'Printer' },
|
|
2337
|
+
{ code: '1F4F7', desc: 'Camera' },
|
|
2338
|
+
{ code: '1F4F8', desc: 'Camera with flash' },
|
|
2339
|
+
{ code: '1F4FD', desc: 'Film projector' },
|
|
2340
|
+
{ code: '1F3A5', desc: 'Movie camera' },
|
|
2341
|
+
{ code: '1F4FA', desc: 'Television' },
|
|
2342
|
+
{ code: '1F4FB', desc: 'Radio' },
|
|
2343
|
+
{ code: '1F50B', desc: 'Battery' },
|
|
2344
|
+
{ code: '231A', desc: 'Watch' },
|
|
2345
|
+
{ code: '1F4F1', desc: 'Mobile phone' },
|
|
2346
|
+
{ code: '260E', desc: 'Telephone' },
|
|
2347
|
+
{ code: '1F4BE', desc: 'Floppy disk' },
|
|
2348
|
+
{ code: '1F4BF', desc: 'Optical disk' },
|
|
2349
|
+
{ code: '1F4C0', desc: 'Digital versatile disc' },
|
|
2350
|
+
{ code: '1F4BD', desc: 'Computer disk' },
|
|
2351
|
+
{ code: '1F3A7', desc: 'Headphone' },
|
|
2352
|
+
{ code: '1F3A4', desc: 'Microphone' },
|
|
2353
|
+
{ code: '1F3B6', desc: 'Multiple musical notes' },
|
|
2354
|
+
{ code: '1F4DA', desc: 'Books' }]
|
|
2355
|
+
}, {
|
|
2356
|
+
name: 'Symbols', code: '1F3E7', iconCss: 'e-symbols', icons: [{ code: '274C', desc: 'Cross mark' },
|
|
2357
|
+
{ code: '2714', desc: 'Check mark' },
|
|
2358
|
+
{ code: '26A0', desc: 'Warning sign' },
|
|
2359
|
+
{ code: '1F6AB', desc: 'Prohibited' },
|
|
2360
|
+
{ code: '2139', desc: 'Information' },
|
|
2361
|
+
{ code: '267B', desc: 'Recycling symbol' },
|
|
2362
|
+
{ code: '1F6AD', desc: 'No smoking' },
|
|
2363
|
+
{ code: '1F4F5', desc: 'No mobile phones' },
|
|
2364
|
+
{ code: '1F6AF', desc: 'No littering' },
|
|
2365
|
+
{ code: '1F6B3', desc: 'No bicycles' },
|
|
2366
|
+
{ code: '1F6B7', desc: 'No pedestrians' },
|
|
2367
|
+
{ code: '2795', desc: 'Plus' },
|
|
2368
|
+
{ code: '2796', desc: 'Minus' },
|
|
2369
|
+
{ code: '2797', desc: 'Divide' },
|
|
2370
|
+
{ code: '2716', desc: 'Multiplication' },
|
|
2371
|
+
{ code: '1F4B2', desc: 'Dollar banknote' },
|
|
2372
|
+
{ code: '1F4AC', desc: 'Speech balloon' },
|
|
2373
|
+
{ code: '2755', desc: 'White exclamation mark' },
|
|
2374
|
+
{ code: '2754', desc: 'White question mark' },
|
|
2375
|
+
{ code: '2764', desc: 'Red heart' }]
|
|
2376
|
+
}];
|
|
2180
2377
|
|
|
2181
2378
|
/* eslint-disable */
|
|
2182
2379
|
/**
|
|
@@ -2371,7 +2568,13 @@ var defaultLocale = {
|
|
|
2371
2568
|
'bulletFormatListSquare': 'Square',
|
|
2372
2569
|
'numberFormatListNone': 'None',
|
|
2373
2570
|
'bulletFormatListNone': 'None',
|
|
2374
|
-
'formatPainter': 'Format Painter'
|
|
2571
|
+
'formatPainter': 'Format Painter',
|
|
2572
|
+
'emojiPicker': 'Emoji Picker',
|
|
2573
|
+
'embeddedCode': 'Embedded Code',
|
|
2574
|
+
'pasteEmbeddedCodeHere': 'Paste Embedded Code here',
|
|
2575
|
+
'emojiPickerTypeToFind': 'Type to find',
|
|
2576
|
+
'emojiPickerNoResultFound': 'No results found',
|
|
2577
|
+
'emojiPickerTrySomethingElse': 'Try something else',
|
|
2375
2578
|
};
|
|
2376
2579
|
var toolsLocale = {
|
|
2377
2580
|
'alignments': 'alignments',
|
|
@@ -2459,7 +2662,13 @@ var toolsLocale = {
|
|
|
2459
2662
|
'insertrowbefore': 'insertRowBefore',
|
|
2460
2663
|
'insertrowafter': 'insertRowAfter',
|
|
2461
2664
|
'deleterow': 'deleteRow',
|
|
2462
|
-
'formatpainter': 'formatPainter'
|
|
2665
|
+
'formatpainter': 'formatPainter',
|
|
2666
|
+
'emojipicker': 'emojiPicker',
|
|
2667
|
+
'embeddedCode': 'Embedded Code',
|
|
2668
|
+
'pasteEmbeddedCodeHere': 'Paste Embedded Code here',
|
|
2669
|
+
'emojiPickerTypeToFind': 'Type to find',
|
|
2670
|
+
'emojiPickerNoResultFound': 'No results found',
|
|
2671
|
+
'emojiPickerTrySomethingElse': 'Try something else',
|
|
2463
2672
|
};
|
|
2464
2673
|
var fontNameLocale = [
|
|
2465
2674
|
{ locale: 'fontNameSegoeUI', value: 'Segoe UI' },
|
|
@@ -2643,7 +2852,8 @@ function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
2643
2852
|
var item = e.tbItems[j].subCommand;
|
|
2644
2853
|
var itemStr = item && item.toLocaleLowerCase();
|
|
2645
2854
|
if (item && (itemStr === key) || (item === 'UL' && key === 'unorderedlist') || (item === 'OL' && key === 'orderedlist') ||
|
|
2646
|
-
(itemStr === 'pre' && key === 'insertcode')
|
|
2855
|
+
(itemStr === 'pre' && key === 'insertcode') || (item === 'NumberFormatList' && key === 'numberFormatList' ||
|
|
2856
|
+
item === 'BulletFormatList' && key === 'bulletFormatList')) {
|
|
2647
2857
|
if (typeof data["" + key] === 'boolean') {
|
|
2648
2858
|
if (data["" + key] === true) {
|
|
2649
2859
|
addClass([e.tbElements[j]], [CLS_ACTIVE]);
|
|
@@ -2695,7 +2905,6 @@ function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
2695
2905
|
var fontNameContent = isNullOrUndefined(e.parent.fontFamily.default) ? fontNameItems[0].text :
|
|
2696
2906
|
e.parent.fontFamily.default;
|
|
2697
2907
|
var name_1 = (isNullOrUndefined(result) ? fontNameContent : result);
|
|
2698
|
-
e.tbElements[j].title = name_1;
|
|
2699
2908
|
dropDown.fontNameDropDown.content = ('<span style="display: inline-flex;' +
|
|
2700
2909
|
'width:' + e.parent.fontFamily.width + '" >' +
|
|
2701
2910
|
'<span class="e-rte-dropdown-btn-text' + (isNullOrUndefined(e.parent.cssClass) ? '' : ' ' + e.parent.cssClass) + '">'
|
|
@@ -3091,6 +3300,10 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
3091
3300
|
}
|
|
3092
3301
|
ToolbarRenderer.prototype.wireEvent = function () {
|
|
3093
3302
|
this.parent.on(destroy, this.unWireEvent, this);
|
|
3303
|
+
this.parent.on(maximizeMinimizeClick, this.destroyTooltip, this);
|
|
3304
|
+
};
|
|
3305
|
+
ToolbarRenderer.prototype.destroyTooltip = function () {
|
|
3306
|
+
this.tooltip.close();
|
|
3094
3307
|
};
|
|
3095
3308
|
ToolbarRenderer.prototype.unWireEvent = function () {
|
|
3096
3309
|
this.parent.off(destroy, this.unWireEvent);
|
|
@@ -3187,12 +3400,13 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
3187
3400
|
args.rteToolbarObj.toolbarObj.createElement = this.parent.createElement;
|
|
3188
3401
|
args.rteToolbarObj.toolbarObj.appendTo(args.target);
|
|
3189
3402
|
if (this.parent.showTooltip) {
|
|
3190
|
-
|
|
3403
|
+
this.tooltip = new Tooltip({
|
|
3191
3404
|
target: '#' + this.parent.getID() + '_toolbar_wrapper [title]',
|
|
3192
3405
|
showTipPointer: true,
|
|
3406
|
+
openDelay: 400,
|
|
3193
3407
|
cssClass: this.parent.cssClass
|
|
3194
3408
|
});
|
|
3195
|
-
tooltip.appendTo(args.target);
|
|
3409
|
+
this.tooltip.appendTo(args.target);
|
|
3196
3410
|
}
|
|
3197
3411
|
};
|
|
3198
3412
|
/**
|
|
@@ -3796,8 +4010,9 @@ var BaseToolbar = /** @__PURE__ @class */ (function () {
|
|
|
3796
4010
|
_this.parent.formatter.saveData();
|
|
3797
4011
|
}
|
|
3798
4012
|
callback_1.call(_this);
|
|
3799
|
-
|
|
3800
|
-
|
|
4013
|
+
var currentContentElem = _this.parent.createElement('div');
|
|
4014
|
+
currentContentElem.appendChild(_this.parent.formatter.getUndoRedoStack()[_this.parent.formatter.getUndoRedoStack().length - 1].text);
|
|
4015
|
+
if (currentContentElem.innerHTML.trim() === _this.parent.inputElement.innerHTML.trim()) {
|
|
3801
4016
|
return;
|
|
3802
4017
|
}
|
|
3803
4018
|
if (proxy_1.undo) {
|
|
@@ -5891,7 +6106,8 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
5891
6106
|
*/
|
|
5892
6107
|
BaseQuickToolbar.prototype.showPopup = function (x, y, target) {
|
|
5893
6108
|
var _this = this;
|
|
5894
|
-
var eventArgs = { popup: this.popupObj, cancel: false, targetElement: target
|
|
6109
|
+
var eventArgs = { popup: this.popupObj, cancel: false, targetElement: target,
|
|
6110
|
+
positionX: x, positionY: y };
|
|
5895
6111
|
this.parent.trigger(beforeQuickToolbarOpen, eventArgs, function (beforeQuickToolbarArgs) {
|
|
5896
6112
|
if (!beforeQuickToolbarArgs.cancel) {
|
|
5897
6113
|
var editPanelTop = void 0;
|
|
@@ -5927,12 +6143,13 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
5927
6143
|
if (_this.parent.showTooltip) {
|
|
5928
6144
|
_this.tooltip = new Tooltip({
|
|
5929
6145
|
target: '#' + _this.element.id + ' [title]',
|
|
6146
|
+
openDelay: 400,
|
|
5930
6147
|
showTipPointer: true
|
|
5931
6148
|
});
|
|
5932
6149
|
_this.tooltip.appendTo(_this.element);
|
|
5933
6150
|
}
|
|
5934
|
-
_this.popupObj.position.X =
|
|
5935
|
-
_this.popupObj.position.Y =
|
|
6151
|
+
_this.popupObj.position.X = beforeQuickToolbarArgs.positionX + 20;
|
|
6152
|
+
_this.popupObj.position.Y = beforeQuickToolbarArgs.positionY + 20;
|
|
5936
6153
|
_this.popupObj.dataBind();
|
|
5937
6154
|
_this.popupObj.element.classList.add('e-popup-open');
|
|
5938
6155
|
_this.dropDownButtons.renderDropDowns({
|
|
@@ -6007,6 +6224,11 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
6007
6224
|
}
|
|
6008
6225
|
this.tooltip.destroy();
|
|
6009
6226
|
}
|
|
6227
|
+
else {
|
|
6228
|
+
if (!isNullOrUndefined(this.tooltip)) {
|
|
6229
|
+
this.tooltip.destroy();
|
|
6230
|
+
}
|
|
6231
|
+
}
|
|
6010
6232
|
if (!isNullOrUndefined(this.parent.getToolbar()) && !this.parent.inlineMode.enable) {
|
|
6011
6233
|
if (isNullOrUndefined(viewSourcePanel) || viewSourcePanel.style.display === 'none') {
|
|
6012
6234
|
this.parent.enableToolbarItem(this.parent.toolbarSettings.items);
|
|
@@ -7232,6 +7454,8 @@ function getDefaultHtmlTbStatus() {
|
|
|
7232
7454
|
strikethrough: false,
|
|
7233
7455
|
orderedlist: false,
|
|
7234
7456
|
unorderedlist: false,
|
|
7457
|
+
numberFormatList: false,
|
|
7458
|
+
bulletFormatList: false,
|
|
7235
7459
|
underline: false,
|
|
7236
7460
|
alignments: null,
|
|
7237
7461
|
backgroundcolor: null,
|
|
@@ -7399,7 +7623,8 @@ var ExecCommandCallBack = /** @__PURE__ @class */ (function () {
|
|
|
7399
7623
|
this.parent.on(destroy, this.removeEventListener, this);
|
|
7400
7624
|
};
|
|
7401
7625
|
ExecCommandCallBack.prototype.commandCallBack = function (args) {
|
|
7402
|
-
|
|
7626
|
+
var formatPainterCopy = !isNullOrUndefined(args.requestType) && args.requestType === 'FormatPainter' && args.action === 'format-copy';
|
|
7627
|
+
if (!isNullOrUndefined(args) && !isNullOrUndefined(args.requestType) && args.requestType !== 'Undo' && args.requestType !== 'Redo' && !formatPainterCopy) {
|
|
7403
7628
|
this.parent.formatter.saveData();
|
|
7404
7629
|
}
|
|
7405
7630
|
this.parent.notify(toolbarRefresh, { args: args });
|
|
@@ -7499,6 +7724,12 @@ var SPACE_ACTION = 'actionBegin';
|
|
|
7499
7724
|
* @hidden
|
|
7500
7725
|
*/
|
|
7501
7726
|
var FORMAT_PAINTER_ACTIONS = 'format_painter_actions';
|
|
7727
|
+
/**
|
|
7728
|
+
* Emoji picker event constant
|
|
7729
|
+
*
|
|
7730
|
+
* @hidden
|
|
7731
|
+
*/
|
|
7732
|
+
var EMOJI_PICKER_ACTIONS = 'emoji_picker_actions';
|
|
7502
7733
|
|
|
7503
7734
|
/**
|
|
7504
7735
|
* Formatter
|
|
@@ -7543,6 +7774,7 @@ var Formatter = /** @__PURE__ @class */ (function () {
|
|
|
7543
7774
|
&& args.item.command !== 'Files'
|
|
7544
7775
|
&& args.item.command !== 'Audios'
|
|
7545
7776
|
&& args.item.command !== 'Videos'
|
|
7777
|
+
&& args.item.command !== 'EmojiPicker'
|
|
7546
7778
|
&& range
|
|
7547
7779
|
&& !(self.contentModule.getEditPanel().contains(this.getAncestorNode(range.commonAncestorContainer))
|
|
7548
7780
|
|| self.contentModule.getEditPanel() === range.commonAncestorContainer
|
|
@@ -7608,13 +7840,14 @@ var Formatter = /** @__PURE__ @class */ (function () {
|
|
|
7608
7840
|
&& args.item.command !== 'Font')
|
|
7609
7841
|
|| ((args.item.subCommand === 'FontName' || args.item.subCommand === 'FontSize') && args.name === 'dropDownSelect')
|
|
7610
7842
|
|| ((args.item.subCommand === 'BackgroundColor' || args.item.subCommand === 'FontColor')
|
|
7611
|
-
&& args.name === 'colorPickerChanged') || args.item.subCommand === 'FormatPainter')) {
|
|
7843
|
+
&& args.name === 'colorPickerChanged') || args.item.subCommand === 'FormatPainter' || args.item.subCommand === 'EmojiPicker')) {
|
|
7612
7844
|
extend(args, args, { requestType: args.item.subCommand, cancel: false, itemCollection: value, selectType: args.name }, true);
|
|
7613
7845
|
self.trigger(actionBegin, args, function (actionBeginArgs) {
|
|
7614
7846
|
if (!actionBeginArgs.cancel) {
|
|
7615
|
-
var
|
|
7616
|
-
|
|
7617
|
-
|
|
7847
|
+
var formatPainterCopy = !isNullOrUndefined(actionBeginArgs.requestType) && actionBeginArgs.requestType === 'FormatPainter' && actionBeginArgs.name === 'format-copy';
|
|
7848
|
+
var formatPainterPaste = !isNullOrUndefined(actionBeginArgs.requestType) && actionBeginArgs.requestType === 'FormatPainter' && actionBeginArgs.name === 'format-paste';
|
|
7849
|
+
if ((_this.getUndoRedoStack().length === 0 && actionBeginArgs.item.command !== 'Links' && actionBeginArgs.item.command !== 'Images' && !formatPainterCopy)
|
|
7850
|
+
|| formatPainterPaste) {
|
|
7618
7851
|
_this.saveData();
|
|
7619
7852
|
}
|
|
7620
7853
|
self.isBlur = false;
|
|
@@ -7636,7 +7869,7 @@ var Formatter = /** @__PURE__ @class */ (function () {
|
|
|
7636
7869
|
}
|
|
7637
7870
|
});
|
|
7638
7871
|
}
|
|
7639
|
-
if (isNullOrUndefined(event) || event && event.action !== 'copy') {
|
|
7872
|
+
if ((isNullOrUndefined(event) || event && event.action !== 'copy')) {
|
|
7640
7873
|
this.enableUndo(self);
|
|
7641
7874
|
}
|
|
7642
7875
|
};
|
|
@@ -8897,8 +9130,8 @@ var htmlKeyConfig = {
|
|
|
8897
9130
|
'enter': '13',
|
|
8898
9131
|
'tab': 'tab',
|
|
8899
9132
|
'delete': '46',
|
|
8900
|
-
'format-copy': '
|
|
8901
|
-
'format-paste': '
|
|
9133
|
+
'format-copy': 'alt+shift+c',
|
|
9134
|
+
'format-paste': 'alt+shift+v'
|
|
8902
9135
|
};
|
|
8903
9136
|
/**
|
|
8904
9137
|
* Default markdown key config for adapter
|
|
@@ -11002,7 +11235,11 @@ var DOMNode = /** @__PURE__ @class */ (function () {
|
|
|
11002
11235
|
var startTextNode;
|
|
11003
11236
|
var endTextNode;
|
|
11004
11237
|
if (start.textContent === '' && isNullOrUndefined(end) && action !== 'tab') {
|
|
11005
|
-
if (
|
|
11238
|
+
if (isNullOrUndefined(action) && save.range.startContainer.nodeType === 1 &&
|
|
11239
|
+
save.range.startContainer.querySelectorAll('audio,video,image').length === 0) {
|
|
11240
|
+
start.innerHTML = '<br>';
|
|
11241
|
+
}
|
|
11242
|
+
else if (start.childNodes.length === 1 && start.childNodes[0].nodeName === 'BR') {
|
|
11006
11243
|
start.innerHTML = '<br>';
|
|
11007
11244
|
}
|
|
11008
11245
|
else {
|
|
@@ -11091,7 +11328,7 @@ var DOMNode = /** @__PURE__ @class */ (function () {
|
|
|
11091
11328
|
markerStart.appendChild(start);
|
|
11092
11329
|
}
|
|
11093
11330
|
else {
|
|
11094
|
-
if (start.nodeType !== 3 && start.nodeName !== '#text') {
|
|
11331
|
+
if (start.nodeType !== 3 && start.nodeName !== '#text' && start.nodeName !== 'BR') {
|
|
11095
11332
|
var marker = this.marker(markerClassName.startSelection, '');
|
|
11096
11333
|
append([this.parseHTMLFragment(marker)], start);
|
|
11097
11334
|
}
|
|
@@ -13326,7 +13563,12 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
13326
13563
|
InsertHtml.removeEmptyElements = function (element) {
|
|
13327
13564
|
var emptyElements = element.querySelectorAll(':empty');
|
|
13328
13565
|
for (var i = 0; i < emptyElements.length; i++) {
|
|
13329
|
-
|
|
13566
|
+
var lineWithDiv = true;
|
|
13567
|
+
if (emptyElements[i].tagName === 'DIV') {
|
|
13568
|
+
lineWithDiv = emptyElements[i].style.borderBottom === 'none' ||
|
|
13569
|
+
emptyElements[i].style.borderBottom === '' ? true : false;
|
|
13570
|
+
}
|
|
13571
|
+
if (SELF_CLOSING_TAGS.indexOf(emptyElements[i].tagName.toLowerCase()) < 0 && lineWithDiv) {
|
|
13330
13572
|
var detachableElement = this.findDetachEmptyElem(emptyElements[i]);
|
|
13331
13573
|
if (!isNullOrUndefined(detachableElement)) {
|
|
13332
13574
|
detach(detachableElement);
|
|
@@ -13433,7 +13675,7 @@ var LinkCommand = /** @__PURE__ @class */ (function () {
|
|
|
13433
13675
|
var domSelection = new NodeSelection();
|
|
13434
13676
|
var range = domSelection.getRange(this.parent.currentDocument);
|
|
13435
13677
|
if (range.endContainer.nodeName === '#text' && range.startContainer.textContent.length === (range.endOffset + 1) &&
|
|
13436
|
-
range.endContainer.textContent.charAt(range.endOffset) === ' ' && range.endContainer.nextSibling.nodeName === 'A') {
|
|
13678
|
+
range.endContainer.textContent.charAt(range.endOffset) === ' ' && (!isNullOrUndefined(range.endContainer.nextSibling) && range.endContainer.nextSibling.nodeName === 'A')) {
|
|
13437
13679
|
domSelection.setSelectionText(this.parent.currentDocument, range.startContainer, range.endContainer, range.startOffset, range.endOffset + 1);
|
|
13438
13680
|
range = domSelection.getRange(this.parent.currentDocument);
|
|
13439
13681
|
}
|
|
@@ -15158,10 +15400,10 @@ var TableCommand = /** @__PURE__ @class */ (function () {
|
|
|
15158
15400
|
this.updateRowSpanStyle(minMaxIndexes.startRow, minMaxIndexes.endRow, this.getCorrespondingColumns());
|
|
15159
15401
|
this.updateColSpanStyle(minMaxIndexes.startColumn, minMaxIndexes.endColumn, this.getCorrespondingColumns());
|
|
15160
15402
|
e.item.selection.setSelectionText(this.parent.currentDocument, e.item.selection.range.startContainer, e.item.selection.range.startContainer, 0, 0);
|
|
15161
|
-
if (this.parent.nodeSelection
|
|
15403
|
+
if (this.parent.nodeSelection && firstCell) {
|
|
15162
15404
|
this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,
|
|
15163
15405
|
// eslint-disable-next-line
|
|
15164
|
-
|
|
15406
|
+
firstCell, 0);
|
|
15165
15407
|
}
|
|
15166
15408
|
if (e.callBack) {
|
|
15167
15409
|
e.callBack({
|
|
@@ -16297,8 +16539,10 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
16297
16539
|
while (currentFormatNode) {
|
|
16298
16540
|
var isSameTextContent = currentFormatNode.parentElement.textContent.trim()
|
|
16299
16541
|
=== nodes[index].textContent.trim();
|
|
16300
|
-
|
|
16301
|
-
|
|
16542
|
+
var parent_1 = currentFormatNode.parentElement;
|
|
16543
|
+
if (!domNode.isBlockNode(parent_1) && isSameTextContent &&
|
|
16544
|
+
!(parent_1.nodeName === 'SPAN' && parent_1.classList.contains('e-img-inner'))) {
|
|
16545
|
+
currentFormatNode = parent_1;
|
|
16302
16546
|
}
|
|
16303
16547
|
else {
|
|
16304
16548
|
break;
|
|
@@ -16479,33 +16723,19 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
16479
16723
|
};
|
|
16480
16724
|
// Below function is used to insert the element created by the format painter plugin.
|
|
16481
16725
|
SelectionCommands.insertFormatPainterElem = function (nodes, index, range, nodeCutter, painterValues, domNode) {
|
|
16482
|
-
var parent = nodes[index].parentElement
|
|
16726
|
+
var parent = !domNode.isBlockNode(nodes[index].parentElement) ?
|
|
16727
|
+
nodes[index].parentElement : nodes[index];
|
|
16483
16728
|
if (!domNode.isBlockNode(parent)) {
|
|
16484
|
-
// The below code is used to remove the already present inline style from the text node.
|
|
16485
16729
|
while (parent.textContent.trim() === parent.parentElement.textContent.trim() && !domNode.isBlockNode(parent.parentElement)) {
|
|
16486
16730
|
parent = parent.parentElement;
|
|
16487
16731
|
}
|
|
16488
|
-
|
|
16489
|
-
|
|
16490
|
-
|
|
16491
|
-
|
|
16492
|
-
if (childELemList[i].textContent.trim() === nodes[i].textContent.trim()) {
|
|
16493
|
-
parent.parentNode.insertBefore(childELemList[i], parent);
|
|
16494
|
-
break;
|
|
16495
|
-
}
|
|
16496
|
-
}
|
|
16497
|
-
var blockChildNodes = parent.parentElement.childNodes;
|
|
16498
|
-
for (var k = 0; k < blockChildNodes.length; k++) {
|
|
16499
|
-
if (blockChildNodes[k].textContent.trim() === '' || blockChildNodes[k].textContent.length === 0) {
|
|
16500
|
-
detach(blockChildNodes[k]);
|
|
16501
|
-
}
|
|
16502
|
-
}
|
|
16503
|
-
}
|
|
16504
|
-
else {
|
|
16505
|
-
InsertMethods.unwrap(parent);
|
|
16506
|
-
}
|
|
16732
|
+
}
|
|
16733
|
+
// The below code is used to remove the already present inline style from the text node.
|
|
16734
|
+
if (!isNullOrUndefined(parent) && parent.nodeType === 1 && !(parent.classList.contains('e-rte-img-caption') || parent.classList.contains('e-img-inner'))) {
|
|
16735
|
+
this.formatPainterCleanup(index, nodes, parent, range, nodeCutter, domNode);
|
|
16507
16736
|
}
|
|
16508
16737
|
var elem = painterValues.element;
|
|
16738
|
+
// The below code is used to apply the inline format copied.
|
|
16509
16739
|
if (!isNullOrUndefined(elem)) {
|
|
16510
16740
|
// Step 1: Cloning the element that is created by format painter.
|
|
16511
16741
|
// Step 2: Finding the last child of the nested elememt using the paintervalues.lastchild nodename
|
|
@@ -16530,6 +16760,43 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
16530
16760
|
}
|
|
16531
16761
|
return nodes[index];
|
|
16532
16762
|
};
|
|
16763
|
+
SelectionCommands.formatPainterCleanup = function (index, nodes, parent, range, nodeCutter, domNode) {
|
|
16764
|
+
var INVALID_TAGS = ['A', 'AUDIO', 'IMG', 'VIDEO', 'IFRAME'];
|
|
16765
|
+
if (index === 0 && parent.textContent.trim() !== nodes[index].textContent.trim()) {
|
|
16766
|
+
nodeCutter.SplitNode(range, parent, true);
|
|
16767
|
+
var childELemList = nodes[index].parentElement.childNodes;
|
|
16768
|
+
for (var i = 0; i < childELemList.length; i++) {
|
|
16769
|
+
if (childELemList[i].textContent.trim() === nodes[i].textContent.trim()) {
|
|
16770
|
+
parent.parentNode.insertBefore(childELemList[i], parent);
|
|
16771
|
+
break;
|
|
16772
|
+
}
|
|
16773
|
+
}
|
|
16774
|
+
var blockChildNodes = parent.parentElement.childNodes;
|
|
16775
|
+
for (var k = 0; k < blockChildNodes.length; k++) {
|
|
16776
|
+
if (blockChildNodes[k].textContent.trim() === '' || blockChildNodes[k].textContent.length === 0) {
|
|
16777
|
+
detach(blockChildNodes[k]);
|
|
16778
|
+
}
|
|
16779
|
+
}
|
|
16780
|
+
}
|
|
16781
|
+
else if (parent.textContent.trim() !== nodes[index].textContent.trim()) {
|
|
16782
|
+
parent.parentElement.insertBefore(nodes[index], parent);
|
|
16783
|
+
}
|
|
16784
|
+
else {
|
|
16785
|
+
while (!isNullOrUndefined(parent) && parent.nodeType !== 3 && !domNode.isBlockNode(parent)) {
|
|
16786
|
+
var temp = void 0;
|
|
16787
|
+
for (var i = 0; i < parent.childNodes.length; i++) {
|
|
16788
|
+
var currentChild = parent.childNodes[i];
|
|
16789
|
+
if (currentChild.textContent.trim().length !== 0 && currentChild.nodeType !== 3) {
|
|
16790
|
+
temp = parent.childNodes[i];
|
|
16791
|
+
}
|
|
16792
|
+
}
|
|
16793
|
+
if (INVALID_TAGS.indexOf(parent.tagName) === -1) {
|
|
16794
|
+
InsertMethods.unwrap(parent);
|
|
16795
|
+
}
|
|
16796
|
+
parent = temp;
|
|
16797
|
+
}
|
|
16798
|
+
}
|
|
16799
|
+
};
|
|
16533
16800
|
SelectionCommands.enterAction = 'P';
|
|
16534
16801
|
return SelectionCommands;
|
|
16535
16802
|
}());
|
|
@@ -16646,6 +16913,7 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
|
|
|
16646
16913
|
* @param {Node} endNode - specifies the end node
|
|
16647
16914
|
* @param {string} enterAction - specifies the enter key action
|
|
16648
16915
|
* @param {string} selector - specifies the string value
|
|
16916
|
+
* @param {string} command - specifies the command value
|
|
16649
16917
|
* @returns {void}
|
|
16650
16918
|
* @hidden
|
|
16651
16919
|
* @deprecated
|
|
@@ -17013,6 +17281,19 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
|
|
|
17013
17281
|
this.saveData(e);
|
|
17014
17282
|
}
|
|
17015
17283
|
};
|
|
17284
|
+
UndoRedoManager.prototype.getTextContentFromFragment = function (fragment) {
|
|
17285
|
+
var textContent = '';
|
|
17286
|
+
for (var i = 0; i < fragment.childNodes.length; i++) {
|
|
17287
|
+
var childNode = fragment.childNodes[i];
|
|
17288
|
+
if (childNode.nodeType === Node.TEXT_NODE) {
|
|
17289
|
+
textContent += childNode.textContent;
|
|
17290
|
+
}
|
|
17291
|
+
else if (childNode.nodeType === Node.ELEMENT_NODE) {
|
|
17292
|
+
textContent += this.getTextContentFromFragment(childNode);
|
|
17293
|
+
}
|
|
17294
|
+
}
|
|
17295
|
+
return textContent;
|
|
17296
|
+
};
|
|
17016
17297
|
/**
|
|
17017
17298
|
* RTE collection stored html format.
|
|
17018
17299
|
*
|
|
@@ -17035,8 +17316,12 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
|
|
|
17035
17316
|
}
|
|
17036
17317
|
range = new NodeSelection().getRange(this.parent.currentDocument);
|
|
17037
17318
|
var save = new NodeSelection().save(range, this.parent.currentDocument);
|
|
17038
|
-
var
|
|
17039
|
-
var
|
|
17319
|
+
var clonedElement = this.parent.editableElement.cloneNode(true);
|
|
17320
|
+
var fragment = document.createDocumentFragment();
|
|
17321
|
+
while (clonedElement.firstChild) {
|
|
17322
|
+
fragment.appendChild(clonedElement.firstChild);
|
|
17323
|
+
}
|
|
17324
|
+
var changEle = { text: fragment, range: save };
|
|
17040
17325
|
if (this.undoRedoStack.length >= this.steps) {
|
|
17041
17326
|
this.undoRedoStack = this.undoRedoStack.slice(0, this.steps + 1);
|
|
17042
17327
|
}
|
|
@@ -17044,7 +17329,8 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
|
|
|
17044
17329
|
&& (this.undoRedoStack[this.undoRedoStack.length - 1].range.startOffset === save.range.startOffset) &&
|
|
17045
17330
|
(this.undoRedoStack[this.undoRedoStack.length - 1].range.endOffset === save.range.endOffset) &&
|
|
17046
17331
|
(this.undoRedoStack[this.undoRedoStack.length - 1].range.range.startContainer === save.range.startContainer) &&
|
|
17047
|
-
(this.undoRedoStack[this.undoRedoStack.length - 1].text.trim() ===
|
|
17332
|
+
(this.getTextContentFromFragment(this.undoRedoStack[this.undoRedoStack.length - 1].text).trim() ===
|
|
17333
|
+
this.getTextContentFromFragment(changEle.text).trim())) {
|
|
17048
17334
|
return;
|
|
17049
17335
|
}
|
|
17050
17336
|
this.undoRedoStack.push(changEle);
|
|
@@ -17070,7 +17356,8 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
|
|
|
17070
17356
|
if (this.steps > 0) {
|
|
17071
17357
|
var range = this.undoRedoStack[this.steps - 1].range;
|
|
17072
17358
|
var removedContent = this.undoRedoStack[this.steps - 1].text;
|
|
17073
|
-
this.parent.editableElement.innerHTML =
|
|
17359
|
+
this.parent.editableElement.innerHTML = '';
|
|
17360
|
+
this.parent.editableElement.appendChild(removedContent.cloneNode(true));
|
|
17074
17361
|
this.parent.editableElement.focus();
|
|
17075
17362
|
if (isIDevice$1()) {
|
|
17076
17363
|
setEditFrameFocus(this.parent.editableElement, e.selector);
|
|
@@ -17100,7 +17387,9 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
|
|
|
17100
17387
|
UndoRedoManager.prototype.redo = function (e) {
|
|
17101
17388
|
if (this.undoRedoStack[this.steps + 1] != null) {
|
|
17102
17389
|
var range = this.undoRedoStack[this.steps + 1].range;
|
|
17103
|
-
|
|
17390
|
+
var addedContent = this.undoRedoStack[this.steps + 1].text;
|
|
17391
|
+
this.parent.editableElement.innerHTML = '';
|
|
17392
|
+
this.parent.editableElement.appendChild(addedContent.cloneNode(true));
|
|
17104
17393
|
this.parent.editableElement.focus();
|
|
17105
17394
|
if (isIDevice$1()) {
|
|
17106
17395
|
setEditFrameFocus(this.parent.editableElement, e.selector);
|
|
@@ -17211,6 +17500,8 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
17211
17500
|
listNodes[0].parentElement.tagName !== 'OL') {
|
|
17212
17501
|
this.listConverter(listNodes);
|
|
17213
17502
|
}
|
|
17503
|
+
this.cleanList(elm, 'UL');
|
|
17504
|
+
this.cleanList(elm, 'OL');
|
|
17214
17505
|
this.styleCorrection(elm, wordPasteStyleConfig);
|
|
17215
17506
|
this.removingComments(elm);
|
|
17216
17507
|
this.removeUnwantedElements(elm);
|
|
@@ -17236,11 +17527,38 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
17236
17527
|
e.callBack(elm.innerHTML);
|
|
17237
17528
|
}
|
|
17238
17529
|
};
|
|
17530
|
+
MsWordPaste.prototype.cleanList = function (elm, listTag) {
|
|
17531
|
+
var replacableElem = elm.querySelectorAll(listTag + ' div');
|
|
17532
|
+
for (var j = replacableElem.length - 1; j >= 0; j--) {
|
|
17533
|
+
var parentElem = replacableElem[j].parentNode;
|
|
17534
|
+
while (replacableElem[j].firstChild) {
|
|
17535
|
+
parentElem.insertBefore(replacableElem[j].firstChild, replacableElem[j]);
|
|
17536
|
+
}
|
|
17537
|
+
var closestListElem = this.findClosestListElem(replacableElem[j]);
|
|
17538
|
+
if (closestListElem) {
|
|
17539
|
+
this.insertAfter(replacableElem[j], closestListElem);
|
|
17540
|
+
}
|
|
17541
|
+
}
|
|
17542
|
+
};
|
|
17543
|
+
MsWordPaste.prototype.insertAfter = function (newNode, referenceNode) {
|
|
17544
|
+
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
|
|
17545
|
+
};
|
|
17546
|
+
MsWordPaste.prototype.findClosestListElem = function (listElem) {
|
|
17547
|
+
var closestListElem;
|
|
17548
|
+
while (!isNullOrUndefined(listElem)) {
|
|
17549
|
+
listElem = !isNullOrUndefined(listElem.closest('ul')) && listElem.tagName !== 'UL' ?
|
|
17550
|
+
listElem.closest('ul') : (listElem.tagName !== 'OL' ? listElem.closest('ol') : null);
|
|
17551
|
+
closestListElem = !isNullOrUndefined(listElem) ? listElem : closestListElem;
|
|
17552
|
+
}
|
|
17553
|
+
return closestListElem;
|
|
17554
|
+
};
|
|
17239
17555
|
MsWordPaste.prototype.addListClass = function (elm) {
|
|
17240
17556
|
var allNodes = elm.querySelectorAll('*');
|
|
17241
17557
|
for (var index = 0; index < allNodes.length; index++) {
|
|
17242
17558
|
if (!isNullOrUndefined(allNodes[index].getAttribute('style')) && allNodes[index].getAttribute('style').replace(/ /g, '').replace('\n', '').indexOf('mso-list:l') >= 0 &&
|
|
17243
|
-
allNodes[index].className.toLowerCase().indexOf('msolistparagraph') === -1 &&
|
|
17559
|
+
allNodes[index].className.toLowerCase().indexOf('msolistparagraph') === -1 &&
|
|
17560
|
+
allNodes[index].tagName.charAt(0) !== 'H' && allNodes[index].tagName !== 'LI' &&
|
|
17561
|
+
allNodes[index].tagName !== 'OL' && allNodes[index].tagName !== 'UL') {
|
|
17244
17562
|
allNodes[index].classList.add('msolistparagraph');
|
|
17245
17563
|
}
|
|
17246
17564
|
}
|
|
@@ -17269,7 +17587,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
17269
17587
|
imgElem[i].getAttribute('v:shapes').indexOf('Picture') < 0 &&
|
|
17270
17588
|
imgElem[i].getAttribute('v:shapes').indexOf('圖片') < 0 &&
|
|
17271
17589
|
imgElem[i].getAttribute('v:shapes').indexOf('Grafik') < 0 &&
|
|
17272
|
-
imgElem[i].getAttribute('v:shapes').indexOf('
|
|
17590
|
+
imgElem[i].getAttribute('v:shapes').toLowerCase().indexOf('image') < 0 &&
|
|
17273
17591
|
imgElem[i].getAttribute('v:shapes').indexOf('Graphic') < 0) {
|
|
17274
17592
|
detach(imgElem[i]);
|
|
17275
17593
|
}
|
|
@@ -17364,7 +17682,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
17364
17682
|
MsWordPaste.prototype.hexConversion = function (rtfData) {
|
|
17365
17683
|
// eslint-disable-next-line
|
|
17366
17684
|
var picHead = /\{\\pict[\s\S]+?\\bliptag\-?\d+(\\blipupi\-?\d+)?(\{\\\*\\blipuid\s?[\da-fA-F]+)?[\s\}]*?/;
|
|
17367
|
-
// eslint-disable-next-line
|
|
17685
|
+
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
17368
17686
|
var pic = new RegExp('(?:(' + picHead.source + '))([\\da-fA-F\\s]+)\\}', 'g');
|
|
17369
17687
|
var fullImg = rtfData.match(pic);
|
|
17370
17688
|
var imgType;
|
|
@@ -17428,9 +17746,9 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
17428
17746
|
MsWordPaste.prototype.removeUnwantedElements = function (elm) {
|
|
17429
17747
|
var innerElement = elm.innerHTML;
|
|
17430
17748
|
for (var i = 0; i < this.removableElements.length; i++) {
|
|
17431
|
-
// eslint-disable-next-line
|
|
17749
|
+
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
17432
17750
|
var regExpStartElem = new RegExp('<' + this.removableElements[i] + '>', 'g');
|
|
17433
|
-
// eslint-disable-next-line
|
|
17751
|
+
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
17434
17752
|
var regExpEndElem = new RegExp('</' + this.removableElements[i] + '>', 'g');
|
|
17435
17753
|
innerElement = innerElement.replace(regExpStartElem, '');
|
|
17436
17754
|
innerElement = innerElement.replace(regExpEndElem, '');
|
|
@@ -17473,9 +17791,14 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
17473
17791
|
!isNullOrUndefined(emptyElements[i].closest('td').querySelector('.MsoNormal'))) {
|
|
17474
17792
|
emptyElements[i].innerHTML = '-';
|
|
17475
17793
|
}
|
|
17794
|
+
var lineWithDiv = true;
|
|
17795
|
+
if (emptyElements[i].tagName === 'DIV') {
|
|
17796
|
+
lineWithDiv = emptyElements[i].style.borderBottom === 'none' ||
|
|
17797
|
+
emptyElements[i].style.borderBottom === '' ? true : false;
|
|
17798
|
+
}
|
|
17476
17799
|
if (emptyElements[i].tagName !== 'IMG' && emptyElements[i].tagName !== 'BR' &&
|
|
17477
17800
|
emptyElements[i].tagName !== 'IFRAME' && emptyElements[i].tagName !== 'TD' &&
|
|
17478
|
-
emptyElements[i].tagName !== 'HR') {
|
|
17801
|
+
emptyElements[i].tagName !== 'HR' && lineWithDiv) {
|
|
17479
17802
|
var detachableElement = this.findDetachEmptyElem(emptyElements[i]);
|
|
17480
17803
|
if (!isNullOrUndefined(detachableElement)) {
|
|
17481
17804
|
detach(detachableElement);
|
|
@@ -17604,7 +17927,6 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
17604
17927
|
elm.innerHTML = innerElement;
|
|
17605
17928
|
};
|
|
17606
17929
|
MsWordPaste.prototype.cleanUp = function (node, listNodes) {
|
|
17607
|
-
// eslint-disable-next-line
|
|
17608
17930
|
var tempCleaner = [];
|
|
17609
17931
|
var prevflagState;
|
|
17610
17932
|
var allNodes = node.querySelectorAll('*');
|
|
@@ -17805,7 +18127,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
17805
18127
|
break;
|
|
17806
18128
|
}
|
|
17807
18129
|
}
|
|
17808
|
-
if (!isNullOrUndefined(prevList) && index
|
|
18130
|
+
if (!isNullOrUndefined(prevList) && index !== 0 &&
|
|
17809
18131
|
collection[index - 1].listType !== collection[index].listType &&
|
|
17810
18132
|
!isNormalList) {
|
|
17811
18133
|
prevList = null;
|
|
@@ -17852,12 +18174,31 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
17852
18174
|
temp.style.listStyleType = collection[index].listStyleTypeName;
|
|
17853
18175
|
}
|
|
17854
18176
|
else {
|
|
17855
|
-
|
|
17856
|
-
|
|
17857
|
-
|
|
17858
|
-
|
|
17859
|
-
|
|
17860
|
-
|
|
18177
|
+
if (collection[index].nestedLevel > pLevel && isNormalList) {
|
|
18178
|
+
var initialNode = void 0;
|
|
18179
|
+
initialNode = createElement(collection[index].listType);
|
|
18180
|
+
prevList = createElement('li');
|
|
18181
|
+
initialNode.appendChild(prevList);
|
|
18182
|
+
initialNode.style.listStyleType = 'none';
|
|
18183
|
+
for (var j = 0; j < collection[index].nestedLevel - 1; j++) {
|
|
18184
|
+
prevList.appendChild(temp = createElement(collection[index].listType));
|
|
18185
|
+
prevList = createElement('li');
|
|
18186
|
+
temp.appendChild(prevList);
|
|
18187
|
+
temp.style.listStyleType = 'none';
|
|
18188
|
+
}
|
|
18189
|
+
prevList.appendChild(pElement);
|
|
18190
|
+
root.appendChild(initialNode);
|
|
18191
|
+
temp.setAttribute('level', collection[index].nestedLevel.toString());
|
|
18192
|
+
temp.style.listStyleType = collection[index].listStyleTypeName;
|
|
18193
|
+
}
|
|
18194
|
+
else {
|
|
18195
|
+
root.appendChild(temp = createElement(collection[index].listType));
|
|
18196
|
+
prevList = createElement('li');
|
|
18197
|
+
prevList.appendChild(pElement);
|
|
18198
|
+
temp.appendChild(prevList);
|
|
18199
|
+
temp.setAttribute('level', collection[index].nestedLevel.toString());
|
|
18200
|
+
temp.style.listStyleType = collection[index].listStyleTypeName;
|
|
18201
|
+
}
|
|
17861
18202
|
}
|
|
17862
18203
|
}
|
|
17863
18204
|
else if (collection[index].nestedLevel === 1) {
|
|
@@ -18304,6 +18645,9 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
18304
18645
|
else if (list === 'none') {
|
|
18305
18646
|
return 'None';
|
|
18306
18647
|
}
|
|
18648
|
+
else if (this.isOrderedList(node)) {
|
|
18649
|
+
return true;
|
|
18650
|
+
}
|
|
18307
18651
|
else {
|
|
18308
18652
|
return null;
|
|
18309
18653
|
}
|
|
@@ -18322,6 +18666,9 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
18322
18666
|
else if (list === 'disc') {
|
|
18323
18667
|
return 'Disc';
|
|
18324
18668
|
}
|
|
18669
|
+
else if (this.isUnorderedList(node)) {
|
|
18670
|
+
return true;
|
|
18671
|
+
}
|
|
18325
18672
|
else {
|
|
18326
18673
|
return null;
|
|
18327
18674
|
}
|
|
@@ -18329,12 +18676,73 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
18329
18676
|
return ToolbarStatus;
|
|
18330
18677
|
}());
|
|
18331
18678
|
|
|
18679
|
+
var EmojiPickerAction = /** @__PURE__ @class */ (function () {
|
|
18680
|
+
function EmojiPickerAction(parent) {
|
|
18681
|
+
this.parent = parent;
|
|
18682
|
+
this.addEventListener();
|
|
18683
|
+
}
|
|
18684
|
+
EmojiPickerAction.prototype.addEventListener = function () {
|
|
18685
|
+
this.parent.observer.on(EMOJI_PICKER_ACTIONS, this.emojiInsert, this);
|
|
18686
|
+
};
|
|
18687
|
+
EmojiPickerAction.prototype.emojiInsert = function (args) {
|
|
18688
|
+
var node = document.createTextNode(args.value);
|
|
18689
|
+
var selection = window.getSelection();
|
|
18690
|
+
var range = selection.getRangeAt(0);
|
|
18691
|
+
var cursorPos = range.startOffset;
|
|
18692
|
+
for (var i = cursorPos - 1; i >= cursorPos - 15; i--) {
|
|
18693
|
+
var prevChar_1 = selection.focusNode.textContent.substring(i - 1, i);
|
|
18694
|
+
var isPrevSpace_1 = /:$/.test(prevChar_1);
|
|
18695
|
+
if (isPrevSpace_1) {
|
|
18696
|
+
this.beforeApplyFormat(true);
|
|
18697
|
+
break;
|
|
18698
|
+
}
|
|
18699
|
+
}
|
|
18700
|
+
var colon = /:$/.test(selection.focusNode.textContent.charAt(cursorPos - 1));
|
|
18701
|
+
var prevChar = selection.focusNode.textContent.charAt(cursorPos - 2);
|
|
18702
|
+
var isPrevSpace = /\s/.test(prevChar);
|
|
18703
|
+
if (colon && (isPrevSpace || selection.focusOffset === 1)) {
|
|
18704
|
+
this.beforeApplyFormat(true);
|
|
18705
|
+
}
|
|
18706
|
+
InsertHtml.Insert(this.parent.currentDocument, node, this.parent.editableElement);
|
|
18707
|
+
if (args.callBack) {
|
|
18708
|
+
args.callBack({
|
|
18709
|
+
requestType: args.subCommand,
|
|
18710
|
+
editorMode: 'HTML',
|
|
18711
|
+
event: args.event,
|
|
18712
|
+
range: this.parent.nodeSelection.getRange(this.parent.currentDocument),
|
|
18713
|
+
elements: this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)
|
|
18714
|
+
});
|
|
18715
|
+
}
|
|
18716
|
+
};
|
|
18717
|
+
EmojiPickerAction.prototype.beforeApplyFormat = function (isBlockFormat) {
|
|
18718
|
+
var range1 = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
18719
|
+
var node = this.parent.nodeSelection.getNodeCollection(range1)[0];
|
|
18720
|
+
var blockNewLine = !(node.parentElement.innerHTML.replace(/ |<br>/g, '').trim() === ':' || node.textContent.trim().indexOf('/') === 0);
|
|
18721
|
+
var startNode = node;
|
|
18722
|
+
if (blockNewLine && isBlockFormat) {
|
|
18723
|
+
while (startNode !== this.parent.editableElement) {
|
|
18724
|
+
startNode = startNode.parentElement;
|
|
18725
|
+
}
|
|
18726
|
+
}
|
|
18727
|
+
var startPoint = range1.startOffset;
|
|
18728
|
+
while (this.parent.nodeSelection.getRange(document).toString().indexOf(':') === -1) {
|
|
18729
|
+
this.parent.nodeSelection.setSelectionText(document, node, node, startPoint, range1.endOffset);
|
|
18730
|
+
startPoint--;
|
|
18731
|
+
}
|
|
18732
|
+
var range2 = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
18733
|
+
var node2 = this.parent.nodeCutter.GetSpliceNode(range2, node);
|
|
18734
|
+
node2.parentNode.removeChild(node2);
|
|
18735
|
+
};
|
|
18736
|
+
return EmojiPickerAction;
|
|
18737
|
+
}());
|
|
18738
|
+
|
|
18332
18739
|
/**
|
|
18333
18740
|
* Base export
|
|
18334
18741
|
*/
|
|
18335
18742
|
|
|
18336
18743
|
var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
18337
18744
|
function FormatPainterActions(parent, options) {
|
|
18745
|
+
this.INVALID_TAGS = ['A', 'AUDIO', 'IMG', 'VIDEO', 'IFRAME'];
|
|
18338
18746
|
this.parent = parent;
|
|
18339
18747
|
this.settings = options;
|
|
18340
18748
|
this.addEventListener();
|
|
@@ -18342,8 +18750,43 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
|
18342
18750
|
}
|
|
18343
18751
|
FormatPainterActions.prototype.addEventListener = function () {
|
|
18344
18752
|
this.parent.observer.on(FORMAT_PAINTER_ACTIONS, this.actionHandler, this);
|
|
18753
|
+
this.parent.observer.on(MODEL_CHANGED_PLUGIN, this.onPropertyChanged, this);
|
|
18754
|
+
};
|
|
18755
|
+
FormatPainterActions.prototype.onPropertyChanged = function (prop) {
|
|
18756
|
+
if (prop && prop.module === 'formatPainter') {
|
|
18757
|
+
if (!isNullOrUndefined(prop.newProp.formatPainterSettings.allowedFormats)) {
|
|
18758
|
+
this.settings.allowedFormats = prop.newProp.formatPainterSettings.allowedFormats;
|
|
18759
|
+
}
|
|
18760
|
+
if (!isNullOrUndefined(prop.newProp.formatPainterSettings.deniedFormats)) {
|
|
18761
|
+
this.settings.deniedFormats = prop.newProp.formatPainterSettings.deniedFormats;
|
|
18762
|
+
this.setDeniedFormats();
|
|
18763
|
+
}
|
|
18764
|
+
}
|
|
18765
|
+
};
|
|
18766
|
+
FormatPainterActions.prototype.removeEventListener = function () {
|
|
18767
|
+
this.parent.observer.off(FORMAT_PAINTER_ACTIONS, this.actionHandler);
|
|
18768
|
+
this.parent.observer.off(MODEL_CHANGED_PLUGIN, this.onPropertyChanged);
|
|
18769
|
+
};
|
|
18770
|
+
/**
|
|
18771
|
+
* Destroys the format painter.
|
|
18772
|
+
*
|
|
18773
|
+
* @function destroy
|
|
18774
|
+
* @returns {void}
|
|
18775
|
+
* @hidden
|
|
18776
|
+
* @deprecated
|
|
18777
|
+
*/
|
|
18778
|
+
FormatPainterActions.prototype.destroy = function () {
|
|
18779
|
+
this.removeEventListener();
|
|
18780
|
+
this.INVALID_TAGS = null;
|
|
18781
|
+
this.copyCollection = null;
|
|
18782
|
+
this.deniedFormatsCollection = null;
|
|
18783
|
+
this.newElem = null;
|
|
18784
|
+
this.newElemLastChild = null;
|
|
18785
|
+
this.settings = null;
|
|
18786
|
+
this.parent = null;
|
|
18345
18787
|
};
|
|
18346
18788
|
FormatPainterActions.prototype.actionHandler = function (args) {
|
|
18789
|
+
this.settings.allowedContext = ['Text', 'List', 'Table'];
|
|
18347
18790
|
if (!isNullOrUndefined(args) && !isNullOrUndefined(args.item) && !isNullOrUndefined(args.item.formatPainterAction)) {
|
|
18348
18791
|
switch (args.item.formatPainterAction) {
|
|
18349
18792
|
case 'format-copy':
|
|
@@ -18356,6 +18799,19 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
|
18356
18799
|
this.escapeAction();
|
|
18357
18800
|
break;
|
|
18358
18801
|
}
|
|
18802
|
+
this.callBack(args);
|
|
18803
|
+
}
|
|
18804
|
+
};
|
|
18805
|
+
FormatPainterActions.prototype.callBack = function (event) {
|
|
18806
|
+
if (event.callBack) {
|
|
18807
|
+
event.callBack({
|
|
18808
|
+
requestType: 'FormatPainter',
|
|
18809
|
+
action: event.item.formatPainterAction,
|
|
18810
|
+
event: event.event,
|
|
18811
|
+
editorMode: 'HTML',
|
|
18812
|
+
range: this.parent.nodeSelection.getRange(this.parent.currentDocument),
|
|
18813
|
+
elements: this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)
|
|
18814
|
+
});
|
|
18359
18815
|
}
|
|
18360
18816
|
};
|
|
18361
18817
|
FormatPainterActions.prototype.generateElement = function () {
|
|
@@ -18410,7 +18866,6 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
|
18410
18866
|
return;
|
|
18411
18867
|
}
|
|
18412
18868
|
this.insertFormatNode(this.newElem, this.newElemLastChild);
|
|
18413
|
-
this.parent.undoRedoManager.saveData();
|
|
18414
18869
|
};
|
|
18415
18870
|
FormatPainterActions.prototype.removeDeniedFormats = function (parentElement) {
|
|
18416
18871
|
if (!isNullOrUndefined(this.deniedFormatsCollection) && this.deniedFormatsCollection.length > 0) {
|
|
@@ -18459,13 +18914,23 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
|
18459
18914
|
FormatPainterActions.prototype.copyAction = function () {
|
|
18460
18915
|
var copyCollection = [];
|
|
18461
18916
|
var range = this.parent.nodeSelection.getRange(document);
|
|
18462
|
-
var
|
|
18917
|
+
var domSelection = this.parent.nodeSelection;
|
|
18918
|
+
var nodes = range.collapsed ? domSelection.getSelectionNodeCollection(range) :
|
|
18919
|
+
domSelection.getSelectionNodeCollectionBr(range);
|
|
18920
|
+
if (nodes.length === 0 && domSelection.getSelectionNodeCollectionBr(range).length === 0) {
|
|
18921
|
+
return;
|
|
18922
|
+
}
|
|
18923
|
+
else {
|
|
18924
|
+
nodes = nodes.length === 0 ? domSelection.getSelectionNodeCollectionBr(range) : nodes;
|
|
18925
|
+
}
|
|
18926
|
+
var parentElem = nodes[0].parentElement;
|
|
18463
18927
|
var currentContext = this.findCurrentContext(parentElem);
|
|
18464
|
-
var allowedRulesArray = this.settings.allowedFormats.split(';')
|
|
18928
|
+
var allowedRulesArray = this.settings.allowedFormats.indexOf(';') > -1 ? this.settings.allowedFormats.split(';') :
|
|
18929
|
+
[this.settings.allowedFormats];
|
|
18465
18930
|
for (var i = 0; i < allowedRulesArray.length; i++) {
|
|
18466
18931
|
allowedRulesArray[i] = allowedRulesArray[i].trim();
|
|
18467
18932
|
}
|
|
18468
|
-
var _a = this.getRangeParentElem(currentContext,
|
|
18933
|
+
var _a = this.getRangeParentElem(currentContext, parentElem), rangeParentElem = _a[0], context = _a[1];
|
|
18469
18934
|
if (currentContext === null) {
|
|
18470
18935
|
currentContext = context;
|
|
18471
18936
|
}
|
|
@@ -18510,8 +18975,8 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
|
18510
18975
|
}
|
|
18511
18976
|
this.generateElement();
|
|
18512
18977
|
};
|
|
18513
|
-
FormatPainterActions.prototype.getRangeParentElem = function (currentContext,
|
|
18514
|
-
var startContainer =
|
|
18978
|
+
FormatPainterActions.prototype.getRangeParentElem = function (currentContext, rangeParent) {
|
|
18979
|
+
var startContainer = rangeParent;
|
|
18515
18980
|
var rangeParentELem;
|
|
18516
18981
|
if (startContainer.nodeType === 3) {
|
|
18517
18982
|
startContainer = startContainer.parentElement;
|
|
@@ -18531,7 +18996,7 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
|
18531
18996
|
break;
|
|
18532
18997
|
}
|
|
18533
18998
|
if (isNullOrUndefined(rangeParentELem)) {
|
|
18534
|
-
var nearBlockParentName = this.getNearestBlockParentElement(
|
|
18999
|
+
var nearBlockParentName = this.getNearestBlockParentElement(rangeParent);
|
|
18535
19000
|
if (!isNullOrUndefined(nearBlockParentName) && nearBlockParentName !== 'UL' &&
|
|
18536
19001
|
nearBlockParentName !== 'OL' && nearBlockParentName !== 'LI') {
|
|
18537
19002
|
rangeParentELem = closest(startContainer, nearBlockParentName);
|
|
@@ -18543,8 +19008,8 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
|
18543
19008
|
}
|
|
18544
19009
|
return [rangeParentELem, currentContext];
|
|
18545
19010
|
};
|
|
18546
|
-
FormatPainterActions.prototype.getNearestBlockParentElement = function (
|
|
18547
|
-
var node =
|
|
19011
|
+
FormatPainterActions.prototype.getNearestBlockParentElement = function (rangeParent) {
|
|
19012
|
+
var node = rangeParent;
|
|
18548
19013
|
if (node.nodeType === 3) {
|
|
18549
19014
|
node = node.parentNode;
|
|
18550
19015
|
}
|
|
@@ -18587,29 +19052,32 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
|
18587
19052
|
}
|
|
18588
19053
|
};
|
|
18589
19054
|
FormatPainterActions.prototype.validateELementTag = function (node) {
|
|
18590
|
-
var INVALID_TAGS = ['A', 'AUDIO', 'IMG', 'VIDEO', 'IFRAME'];
|
|
18591
19055
|
if (node.nodeType === 3) {
|
|
18592
19056
|
node = node.parentElement;
|
|
18593
19057
|
}
|
|
18594
|
-
return INVALID_TAGS.indexOf(node.tagName) > -1;
|
|
19058
|
+
return this.INVALID_TAGS.indexOf(node.tagName) > -1;
|
|
18595
19059
|
};
|
|
18596
19060
|
FormatPainterActions.prototype.findCurrentContext = function (parentElem) {
|
|
18597
|
-
if (closest(parentElem, '
|
|
18598
|
-
return '
|
|
19061
|
+
if (closest(parentElem, 'p')) {
|
|
19062
|
+
return 'Text';
|
|
18599
19063
|
}
|
|
18600
19064
|
else if (closest(parentElem, 'li')) {
|
|
18601
19065
|
return 'List';
|
|
18602
19066
|
}
|
|
18603
|
-
else if (closest(parentElem, '
|
|
18604
|
-
return '
|
|
19067
|
+
else if (closest(parentElem, 'td') || closest(parentElem, 'tr') || closest(parentElem, 'th')) {
|
|
19068
|
+
return 'Table';
|
|
18605
19069
|
}
|
|
18606
19070
|
return null;
|
|
18607
19071
|
};
|
|
18608
19072
|
FormatPainterActions.prototype.insertFormatNode = function (elem, lastChild) {
|
|
19073
|
+
var clonedElem = elem.cloneNode(true);
|
|
19074
|
+
if (!this.isBlockElement(elem)) {
|
|
19075
|
+
var newBlockElem = createElement('P');
|
|
19076
|
+
newBlockElem.appendChild(elem);
|
|
19077
|
+
clonedElem = newBlockElem.cloneNode(true);
|
|
19078
|
+
}
|
|
18609
19079
|
var endNode = this.parent.editableElement;
|
|
18610
19080
|
var docElement = this.parent.currentDocument;
|
|
18611
|
-
var domSelection = this.parent.nodeSelection;
|
|
18612
|
-
var clonedElem = elem.cloneNode(true);
|
|
18613
19081
|
var childElem = clonedElem.firstChild;
|
|
18614
19082
|
var inlineElement;
|
|
18615
19083
|
while (childElem) {
|
|
@@ -18626,107 +19094,183 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
|
18626
19094
|
lastChild: lastChild
|
|
18627
19095
|
};
|
|
18628
19096
|
SelectionCommands.applyFormat(docElement, null, endNode, 'P', 'formatPainter', null, formatValues);
|
|
18629
|
-
var isFullNodeSelected;
|
|
18630
19097
|
var range = this.parent.nodeSelection.getRange(docElement);
|
|
18631
19098
|
var isCollapsed = range.collapsed;
|
|
18632
|
-
var
|
|
18633
|
-
|
|
18634
|
-
if (
|
|
18635
|
-
|
|
18636
|
-
nodes[0] = nodes[0].parentElement;
|
|
18637
|
-
}
|
|
18638
|
-
isFullNodeSelected = nodes[0].textContent.trim() === range.commonAncestorContainer.wholeText.trim();
|
|
19099
|
+
var blockNodes = this.parent.domNode.blockNodes();
|
|
19100
|
+
var isFullNodeSelected = false;
|
|
19101
|
+
if (blockNodes.length === 1) {
|
|
19102
|
+
isFullNodeSelected = blockNodes[0].textContent.trim() === range.toString().trim();
|
|
18639
19103
|
}
|
|
18640
|
-
if (this.isBlockElement(
|
|
18641
|
-
this.insertBlockNode(
|
|
19104
|
+
if (this.isBlockElement(clonedElem) && isCollapsed || blockNodes.length > 1 || isFullNodeSelected) {
|
|
19105
|
+
this.insertBlockNode(clonedElem, range, docElement, blockNodes);
|
|
18642
19106
|
}
|
|
18643
19107
|
};
|
|
18644
|
-
FormatPainterActions.prototype.insertBlockNode = function (element, range, docElement,
|
|
19108
|
+
FormatPainterActions.prototype.insertBlockNode = function (element, range, docElement, nodes) {
|
|
18645
19109
|
var domSelection = this.parent.nodeSelection;
|
|
19110
|
+
var saveSelection = domSelection.save(range, docElement);
|
|
19111
|
+
this.parent.domNode.setMarker(saveSelection);
|
|
18646
19112
|
var listElement; // To clone to multiple list elements
|
|
18647
19113
|
var cloneListParentNode;
|
|
19114
|
+
var sameListType = false;
|
|
18648
19115
|
if (element.nodeName === 'UL' || element.nodeName === 'OL') {
|
|
18649
19116
|
cloneListParentNode = element.cloneNode(true);
|
|
18650
19117
|
listElement = cloneListParentNode.firstChild;
|
|
18651
19118
|
}
|
|
18652
|
-
var
|
|
19119
|
+
var cloneElementNode = isNullOrUndefined(cloneListParentNode) ? element : element.firstChild;
|
|
18653
19120
|
for (var index = 0; index < nodes.length; index++) {
|
|
18654
|
-
|
|
18655
|
-
|
|
18656
|
-
|
|
18657
|
-
}
|
|
18658
|
-
while (!this.isBlockElement(nodes[index])) {
|
|
18659
|
-
nodes[index] = nodes[index].parentElement;
|
|
18660
|
-
}
|
|
18661
|
-
var cloneParentNode = void 0;
|
|
18662
|
-
if (!isNullOrUndefined(cloneListParentNode)) {
|
|
18663
|
-
cloneParentNode = listElement.cloneNode(true);
|
|
18664
|
-
}
|
|
18665
|
-
else {
|
|
18666
|
-
cloneParentNode = element.cloneNode(true);
|
|
19121
|
+
if (this.INVALID_TAGS.indexOf(nodes[index].nodeName) > -1 ||
|
|
19122
|
+
nodes[index].querySelectorAll('a,img,audio,video,iframe').length > 0) {
|
|
19123
|
+
continue;
|
|
18667
19124
|
}
|
|
19125
|
+
var cloneParentNode = cloneElementNode.cloneNode(false);
|
|
18668
19126
|
// Appending all the child elements
|
|
18669
19127
|
while (nodes[index].firstChild) {
|
|
18670
|
-
if (
|
|
19128
|
+
if (nodes[index].textContent.trim().length !== 0) {
|
|
18671
19129
|
cloneParentNode.appendChild(nodes[index].firstChild);
|
|
18672
19130
|
}
|
|
18673
19131
|
else {
|
|
18674
|
-
|
|
18675
|
-
if (nodes[index].nodeType === 3) {
|
|
18676
|
-
cloneParentNode.appendChild(nodes[index].firstChild);
|
|
18677
|
-
}
|
|
18678
|
-
else {
|
|
18679
|
-
cloneParentNode.innerHTML = nodes[index].innerHTML;
|
|
18680
|
-
nodes[index].innerHTML = '';
|
|
18681
|
-
}
|
|
18682
|
-
nodes[index] = nodes[index].parentNode.replaceChild(cloneParentNode, nodes[index]);
|
|
19132
|
+
nodes[index].removeChild(nodes[index].firstChild);
|
|
18683
19133
|
}
|
|
18684
19134
|
}
|
|
18685
|
-
if (
|
|
18686
|
-
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
var nodeName = nodes[index].nodeName;
|
|
18690
|
-
nodes[index] = nodes[index].parentNode.replaceChild(cloneListParentNode, nodes[index]);
|
|
18691
|
-
var parent_1 = nodeName === 'LI' ? cloneListParentNode.parentElement
|
|
18692
|
-
: cloneListParentNode;
|
|
18693
|
-
// Splicing and then inserting the node to previous element sibling of the Listparent.parent
|
|
18694
|
-
this.parent.nodeCutter.SplitNode(range, parent_1, true);
|
|
18695
|
-
if (!isNullOrUndefined(parent_1.previousElementSibling)) {
|
|
18696
|
-
parent_1.parentNode.insertBefore(cloneListParentNode, parent_1.nextElementSibling);
|
|
18697
|
-
}
|
|
18698
|
-
else {
|
|
18699
|
-
parent_1.parentElement.insertBefore(cloneListParentNode, parent_1);
|
|
18700
|
-
}
|
|
19135
|
+
if (nodes[index].nodeName === 'TD' || nodes[index].nodeName === 'TH') {
|
|
19136
|
+
if (isNullOrUndefined(cloneListParentNode)) {
|
|
19137
|
+
nodes[index].appendChild(cloneParentNode);
|
|
19138
|
+
continue;
|
|
18701
19139
|
}
|
|
18702
|
-
|
|
19140
|
+
else if (index === 0 && !isNullOrUndefined(cloneListParentNode)) {
|
|
19141
|
+
nodes[index].appendChild(cloneListParentNode);
|
|
19142
|
+
cloneListParentNode.appendChild(cloneParentNode);
|
|
19143
|
+
continue;
|
|
19144
|
+
}
|
|
19145
|
+
else {
|
|
19146
|
+
nodes[index].appendChild(cloneParentNode);
|
|
19147
|
+
continue;
|
|
19148
|
+
}
|
|
19149
|
+
}
|
|
19150
|
+
if (!isNullOrUndefined(cloneListParentNode)) {
|
|
19151
|
+
sameListType = this.isSameListType(element, nodes[index]);
|
|
19152
|
+
}
|
|
19153
|
+
if (cloneParentNode.nodeName === 'LI' && !sameListType) {
|
|
19154
|
+
this.insertNewList(range, nodes, index, cloneListParentNode, cloneParentNode);
|
|
19155
|
+
}
|
|
19156
|
+
else if (sameListType) {
|
|
19157
|
+
this.insertSameList(nodes, index, cloneListParentNode, cloneParentNode);
|
|
19158
|
+
}
|
|
19159
|
+
else {
|
|
19160
|
+
nodes[index].parentNode.replaceChild(cloneParentNode, nodes[index]);
|
|
18703
19161
|
}
|
|
18704
19162
|
/**Removing the inserted block node in list and appending to previous element sibling */
|
|
18705
19163
|
if (cloneParentNode.nodeName !== 'LI' && (cloneParentNode.parentElement.nodeName === 'OL' ||
|
|
18706
19164
|
cloneParentNode.parentElement.nodeName === 'UL')) {
|
|
18707
|
-
var
|
|
19165
|
+
var parent_1 = cloneParentNode.parentElement;
|
|
18708
19166
|
// Cutting single ul or ol to two ul or ol based on the range
|
|
18709
|
-
this.parent.nodeCutter.SplitNode(range,
|
|
18710
|
-
if (!isNullOrUndefined(
|
|
18711
|
-
|
|
19167
|
+
this.parent.nodeCutter.SplitNode(range, parent_1, true);
|
|
19168
|
+
if (!isNullOrUndefined(parent_1.previousElementSibling)) {
|
|
19169
|
+
parent_1.previousElementSibling.after(cloneParentNode);
|
|
19170
|
+
// To remove the nested list items out of the block element
|
|
19171
|
+
if (cloneParentNode.childNodes.length > 1) {
|
|
19172
|
+
for (var j = 0; j < cloneParentNode.childNodes.length; j++) {
|
|
19173
|
+
var currentChild = cloneParentNode.childNodes[j];
|
|
19174
|
+
if (currentChild.nodeName === 'OL' || currentChild.nodeName === 'UL') {
|
|
19175
|
+
cloneParentNode.after(currentChild);
|
|
19176
|
+
}
|
|
19177
|
+
}
|
|
19178
|
+
}
|
|
18712
19179
|
}
|
|
18713
19180
|
else {
|
|
18714
|
-
|
|
19181
|
+
parent_1.parentElement.prepend(cloneParentNode);
|
|
18715
19182
|
}
|
|
18716
19183
|
}
|
|
18717
|
-
nodes[index] = lastTextNode;
|
|
18718
19184
|
}
|
|
18719
19185
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
18720
19186
|
!isNullOrUndefined(listElement) ? detach(listElement) : false;
|
|
18721
19187
|
this.cleanEmptyLists();
|
|
18722
|
-
|
|
18723
|
-
|
|
18724
|
-
|
|
18725
|
-
|
|
19188
|
+
var save = this.parent.domNode.saveMarker(saveSelection, null);
|
|
19189
|
+
save.restore();
|
|
19190
|
+
};
|
|
19191
|
+
FormatPainterActions.prototype.insertNewList = function (range, nodes, index, cloneListParentNode, cloneParentNode) {
|
|
19192
|
+
// Appending the li nodes to the ol or ul node
|
|
19193
|
+
if (index === 0) {
|
|
19194
|
+
var nodeName = nodes[index].nodeName;
|
|
19195
|
+
nodes[index] = nodes[index].parentNode.replaceChild(cloneListParentNode, nodes[index]);
|
|
19196
|
+
var parent_2 = nodeName === 'LI' ? cloneListParentNode.parentElement
|
|
19197
|
+
: cloneListParentNode;
|
|
19198
|
+
// Splicing and then inserting the node to previous element sibling of the Listparent.parent
|
|
19199
|
+
this.parent.nodeCutter.SplitNode(range, parent_2, true);
|
|
19200
|
+
if (nodes[index].nodeName === 'LI' && !isNullOrUndefined(parent_2)) {
|
|
19201
|
+
cloneListParentNode.append(cloneParentNode);
|
|
19202
|
+
if (!isNullOrUndefined(parent_2.parentNode)) {
|
|
19203
|
+
parent_2.parentNode.insertBefore(cloneListParentNode, parent_2);
|
|
19204
|
+
}
|
|
19205
|
+
}
|
|
19206
|
+
else {
|
|
19207
|
+
if (!isNullOrUndefined(parent_2)) {
|
|
19208
|
+
if (!isNullOrUndefined(parent_2.previousElementSibling) && parent_2.previousElementSibling.nodeName === cloneListParentNode.nodeName) {
|
|
19209
|
+
var currentParent = parent_2.previousElementSibling;
|
|
19210
|
+
currentParent.append(cloneParentNode);
|
|
19211
|
+
while (currentParent.firstChild) {
|
|
19212
|
+
cloneListParentNode.append(currentParent.firstChild);
|
|
19213
|
+
}
|
|
19214
|
+
}
|
|
19215
|
+
else if (!isNullOrUndefined(parent_2.nextElementSibling) && parent_2.nextElementSibling.nodeName === cloneListParentNode.nodeName) {
|
|
19216
|
+
var currentParent = parent_2.nextElementSibling;
|
|
19217
|
+
currentParent.prepend(cloneParentNode);
|
|
19218
|
+
while (currentParent.firstChild) {
|
|
19219
|
+
cloneListParentNode.append(currentParent.firstChild);
|
|
19220
|
+
}
|
|
19221
|
+
}
|
|
19222
|
+
else {
|
|
19223
|
+
cloneListParentNode.append(cloneParentNode);
|
|
19224
|
+
}
|
|
19225
|
+
}
|
|
19226
|
+
else {
|
|
19227
|
+
cloneListParentNode.append(cloneParentNode);
|
|
19228
|
+
}
|
|
19229
|
+
}
|
|
18726
19230
|
}
|
|
18727
19231
|
else {
|
|
18728
|
-
|
|
19232
|
+
cloneListParentNode.append(cloneParentNode);
|
|
18729
19233
|
}
|
|
19234
|
+
this.detachEmptyBlockNodes(nodes[index]);
|
|
19235
|
+
};
|
|
19236
|
+
FormatPainterActions.prototype.insertSameList = function (nodes, index, cloneListParentNode, cloneParentNode) {
|
|
19237
|
+
if (index === 0) {
|
|
19238
|
+
if (!isNullOrUndefined(nodes[index].parentNode) && (nodes[index].parentNode.nodeName === 'UL' || nodes[index].parentNode.nodeName === 'OL')) {
|
|
19239
|
+
// append the nodes[index].parentNode.childNodes to the clonelistparentnode
|
|
19240
|
+
if (nodes.length === 1) {
|
|
19241
|
+
// When clicked with cursor in the single list item
|
|
19242
|
+
while (cloneParentNode.firstChild) {
|
|
19243
|
+
nodes[index].append(cloneParentNode.firstChild);
|
|
19244
|
+
}
|
|
19245
|
+
for (var i = 0; i < nodes[index].parentNode.childNodes.length; i++) {
|
|
19246
|
+
var currentChild = nodes[index].parentNode.childNodes[i];
|
|
19247
|
+
cloneListParentNode.append(currentChild.cloneNode(true));
|
|
19248
|
+
}
|
|
19249
|
+
}
|
|
19250
|
+
else {
|
|
19251
|
+
cloneListParentNode.append(cloneParentNode);
|
|
19252
|
+
}
|
|
19253
|
+
// replace the older ol and ul with new ol and ul of clonelistparentnode
|
|
19254
|
+
nodes[index].parentNode.parentNode.replaceChild(cloneListParentNode, nodes[index].parentNode);
|
|
19255
|
+
}
|
|
19256
|
+
}
|
|
19257
|
+
else {
|
|
19258
|
+
cloneListParentNode.append(cloneParentNode);
|
|
19259
|
+
}
|
|
19260
|
+
this.detachEmptyBlockNodes(nodes[index]);
|
|
19261
|
+
};
|
|
19262
|
+
FormatPainterActions.prototype.isSameListType = function (element, node) {
|
|
19263
|
+
var isSameListType = false;
|
|
19264
|
+
var nearestListNode = closest(node, 'ol, ul');
|
|
19265
|
+
if (!isNullOrUndefined(nearestListNode) && nearestListNode.querySelectorAll('li').length > 0) {
|
|
19266
|
+
if (nearestListNode.nodeName === element.nodeName) {
|
|
19267
|
+
isSameListType = true;
|
|
19268
|
+
}
|
|
19269
|
+
else {
|
|
19270
|
+
isSameListType = false;
|
|
19271
|
+
}
|
|
19272
|
+
}
|
|
19273
|
+
return isSameListType;
|
|
18730
19274
|
};
|
|
18731
19275
|
FormatPainterActions.prototype.cleanEmptyLists = function () {
|
|
18732
19276
|
var listElem = this.parent.editableElement.querySelectorAll('ol, ul');
|
|
@@ -18741,7 +19285,8 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
|
18741
19285
|
if (isNullOrUndefined(this.settings) || isNullOrUndefined(this.settings.deniedFormats)) {
|
|
18742
19286
|
return;
|
|
18743
19287
|
}
|
|
18744
|
-
var deniedFormats = this.settings.deniedFormats.split(';')
|
|
19288
|
+
var deniedFormats = this.settings.deniedFormats.indexOf(';') > -1 ? this.settings.deniedFormats.split(';') :
|
|
19289
|
+
[this.settings.deniedFormats];
|
|
18745
19290
|
var length = deniedFormats.length;
|
|
18746
19291
|
for (var i = 0; i < length; i++) {
|
|
18747
19292
|
var formatString = deniedFormats[i];
|
|
@@ -18755,6 +19300,11 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
|
18755
19300
|
}
|
|
18756
19301
|
this.deniedFormatsCollection = deniedFormatsCollection;
|
|
18757
19302
|
};
|
|
19303
|
+
FormatPainterActions.prototype.detachEmptyBlockNodes = function (node) {
|
|
19304
|
+
if (!isNullOrUndefined(node) && node.textContent.trim() === '') {
|
|
19305
|
+
detach(node);
|
|
19306
|
+
}
|
|
19307
|
+
};
|
|
18758
19308
|
FormatPainterActions.prototype.makeDeniedFormatsCollection = function (value) {
|
|
18759
19309
|
var openParenIndex = value.indexOf('(');
|
|
18760
19310
|
var closeParenIndex = value.indexOf(')');
|
|
@@ -18840,7 +19390,8 @@ var EditorManager = /** @__PURE__ @class */ (function () {
|
|
|
18840
19390
|
this.tableObj = new TableCommand(this);
|
|
18841
19391
|
this.undoRedoManager = new UndoRedoManager(this, options.options);
|
|
18842
19392
|
this.msWordPaste = new MsWordPaste(this);
|
|
18843
|
-
this.
|
|
19393
|
+
this.formatPainterEditor = new FormatPainterActions(this, options.formatPainterSettings);
|
|
19394
|
+
this.emojiPickerObj = new EmojiPickerAction(this);
|
|
18844
19395
|
this.wireEvents();
|
|
18845
19396
|
}
|
|
18846
19397
|
EditorManager.prototype.wireEvents = function () {
|
|
@@ -18988,6 +19539,9 @@ var EditorManager = /** @__PURE__ @class */ (function () {
|
|
|
18988
19539
|
case 'formatpainter':
|
|
18989
19540
|
this.observer.notify(FORMAT_PAINTER_ACTIONS, { item: exeValue, subCommand: value, event: event, callBack: callBack });
|
|
18990
19541
|
break;
|
|
19542
|
+
case 'emojipicker':
|
|
19543
|
+
this.observer.notify(EMOJI_PICKER_ACTIONS, { item: exeValue, subCommand: value, value: text,
|
|
19544
|
+
event: event, callBack: callBack });
|
|
18991
19545
|
}
|
|
18992
19546
|
};
|
|
18993
19547
|
return EditorManager;
|
|
@@ -19201,7 +19755,7 @@ var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
|
19201
19755
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
19202
19756
|
};
|
|
19203
19757
|
})();
|
|
19204
|
-
var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image, .e-rte-audio, .e-rte-video {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .e-rte-image.e-imgcenter, .e-rte-video.e-video-center {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-img-focus:not(.e-resize), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n .e-rte-placeholder::before { content: attr(placeholder); opacity: 0.54; overflow: hidden
|
|
19758
|
+
var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image, .e-rte-audio, .e-rte-video {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .e-rte-image.e-imgcenter, .e-rte-video.e-video-center {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-img-focus:not(.e-resize), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n .e-rte-placeholder::before { content: attr(placeholder); opacity: 0.54; overflow: hidden; padding-top: 16px; position: absolute; text-align: start; top: 0; z-index: 1; }\n </style>\n </head>";
|
|
19205
19759
|
/**
|
|
19206
19760
|
* Content module is used to render Rich Text Editor content
|
|
19207
19761
|
*
|
|
@@ -19727,9 +20281,15 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
19727
20281
|
};
|
|
19728
20282
|
HtmlEditor.prototype.backSpaceCleanup = function (e, currentRange) {
|
|
19729
20283
|
var isLiElement = false;
|
|
20284
|
+
var isPreviousNotContentEditable = true;
|
|
20285
|
+
if (!isNullOrUndefined(currentRange.startContainer.previousSibling) &&
|
|
20286
|
+
currentRange.startContainer.previousSibling.nodeName === 'SPAN') {
|
|
20287
|
+
isPreviousNotContentEditable = currentRange.startContainer.previousSibling.contentEditable === 'false' ? false : true;
|
|
20288
|
+
}
|
|
19730
20289
|
if (e.args.code === 'Backspace' && e.args.keyCode === 8 && currentRange.startOffset === 0 &&
|
|
19731
20290
|
currentRange.endOffset === 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.textContent.length > 0 &&
|
|
19732
|
-
currentRange.startContainer.parentElement.tagName !== 'TD' && currentRange.startContainer.parentElement.tagName !== 'TH'
|
|
20291
|
+
currentRange.startContainer.parentElement.tagName !== 'TD' && currentRange.startContainer.parentElement.tagName !== 'TH' &&
|
|
20292
|
+
isPreviousNotContentEditable) {
|
|
19733
20293
|
var checkNode = currentRange.startContainer.nodeName === '#text' ? currentRange.startContainer.parentElement : currentRange.startContainer;
|
|
19734
20294
|
if (!this.parent.formatter.editorManager.domNode.isBlockNode(checkNode) &&
|
|
19735
20295
|
!isNullOrUndefined(checkNode.previousSibling) && checkNode.previousSibling.nodeName === 'BR') {
|
|
@@ -19766,9 +20326,14 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
19766
20326
|
? this.oldRangeElement.lastElementChild.lastElementChild :
|
|
19767
20327
|
this.oldRangeElement.lastElementChild;
|
|
19768
20328
|
}
|
|
20329
|
+
var lastNode = this.oldRangeElement.lastChild;
|
|
20330
|
+
while (lastNode.nodeType !== 3 && lastNode.nodeName !== '#text' &&
|
|
20331
|
+
lastNode.nodeName !== 'BR') {
|
|
20332
|
+
lastNode = lastNode.lastChild;
|
|
20333
|
+
}
|
|
19769
20334
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),
|
|
19770
20335
|
// eslint-disable-next-line
|
|
19771
|
-
|
|
20336
|
+
lastNode, lastNode.textContent.length);
|
|
19772
20337
|
if (this.oldRangeElement.querySelectorAll('BR').length === 1) {
|
|
19773
20338
|
detach(this.oldRangeElement.querySelector('BR'));
|
|
19774
20339
|
}
|
|
@@ -19952,7 +20517,7 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
19952
20517
|
var resultSplitContent = '';
|
|
19953
20518
|
for (var j = 0; j < splitTextContent.length; j++) {
|
|
19954
20519
|
if (splitTextContent[j].match(httpRegex) || splitTextContent[j].match(wwwRegex)) {
|
|
19955
|
-
resultSplitContent += '<a
|
|
20520
|
+
resultSplitContent += '<a class="e-rte-anchor" href="' + splitTextContent[j] +
|
|
19956
20521
|
'" title="' + splitTextContent[j] + '"target="_blank">' + splitTextContent[j] + ' </a>';
|
|
19957
20522
|
}
|
|
19958
20523
|
else {
|
|
@@ -20109,6 +20674,9 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
20109
20674
|
member: 'fileManager', args: args, selectNode: selectNodeEle, selection: save, selectParent: selectParentEle
|
|
20110
20675
|
});
|
|
20111
20676
|
break;
|
|
20677
|
+
case 'EmojiPicker':
|
|
20678
|
+
this.parent.notify(emojiPicker, { member: 'emojiPicker', args: args });
|
|
20679
|
+
break;
|
|
20112
20680
|
default:
|
|
20113
20681
|
this.parent.formatter.process(this.parent, args, args.originalEvent, null);
|
|
20114
20682
|
break;
|
|
@@ -20401,6 +20969,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
20401
20969
|
if (Browser.userAgent.indexOf('Firefox') !== -1) {
|
|
20402
20970
|
var currentFocusNode = _this.nodeSelectionObj.getRange(_this.contentRenderer.getDocument()).startContainer;
|
|
20403
20971
|
if (currentFocusNode.nodeName !== '#text') {
|
|
20972
|
+
// eslint-disable-next-line
|
|
20404
20973
|
currentFocusNode = currentFocusNode.childNodes[_this.nodeSelectionObj.getRange(_this.contentRenderer.getDocument()).startOffset];
|
|
20405
20974
|
}
|
|
20406
20975
|
if (currentFocusNode.previousSibling.nodeName === 'IMG') {
|
|
@@ -21313,7 +21882,7 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
21313
21882
|
else {
|
|
21314
21883
|
var eventType = Browser.info.name !== 'msie' ? e.touches[0] : e;
|
|
21315
21884
|
this.parent.element.style.height = eventType.clientY - boundRect.top + 'px';
|
|
21316
|
-
this.parent.element.style.width = (!this.parent.enableRtl) ?
|
|
21885
|
+
this.parent.element.style.width = (!this.parent.enableRtl) ? eventType.clientX - boundRect.left + 'px' : boundRect.right - eventType.clientX + 'px';
|
|
21317
21886
|
}
|
|
21318
21887
|
if (!this.parent.toolbarSettings.enable) {
|
|
21319
21888
|
this.parent.setContentHeight('', false);
|
|
@@ -21490,6 +22059,7 @@ var FileManager$1 = /** @__PURE__ @class */ (function () {
|
|
|
21490
22059
|
detailsViewSettings: this.parent.fileManagerSettings.detailsViewSettings,
|
|
21491
22060
|
contextMenuSettings: this.parent.fileManagerSettings.contextMenuSettings,
|
|
21492
22061
|
navigationPaneSettings: this.parent.fileManagerSettings.navigationPaneSettings,
|
|
22062
|
+
beforeSend: this.parent.fileManagerSettings.beforeSend,
|
|
21493
22063
|
fileSelect: function (e) {
|
|
21494
22064
|
var selectedFile = e.fileDetails;
|
|
21495
22065
|
if (selectedFile.isFile && proxy.parent.insertImageSettings.allowedTypes.indexOf(selectedFile.type) > -1) {
|
|
@@ -21650,6 +22220,9 @@ var FullScreen = /** @__PURE__ @class */ (function () {
|
|
|
21650
22220
|
&& !isNullOrUndefined(this.parent.quickToolbarModule)) {
|
|
21651
22221
|
this.parent.quickToolbarModule.hideQuickToolbars();
|
|
21652
22222
|
}
|
|
22223
|
+
if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
|
|
22224
|
+
this.parent.notify(maximizeMinimizeClick, { args: event });
|
|
22225
|
+
}
|
|
21653
22226
|
this.scrollableParent = getScrollableParent(this.parent.element);
|
|
21654
22227
|
if (!this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
|
|
21655
22228
|
var evenArgs = {
|
|
@@ -21702,6 +22275,9 @@ var FullScreen = /** @__PURE__ @class */ (function () {
|
|
|
21702
22275
|
&& !isNullOrUndefined(this.parent.quickToolbarModule)) {
|
|
21703
22276
|
this.parent.quickToolbarModule.hideQuickToolbars();
|
|
21704
22277
|
}
|
|
22278
|
+
if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
|
|
22279
|
+
this.parent.notify(maximizeMinimizeClick, { args: event });
|
|
22280
|
+
}
|
|
21705
22281
|
if (this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
|
|
21706
22282
|
var evenArgs = {
|
|
21707
22283
|
cancel: false,
|
|
@@ -21879,14 +22455,10 @@ var FormatPainter = /** @__PURE__ @class */ (function () {
|
|
|
21879
22455
|
};
|
|
21880
22456
|
FormatPainter.prototype.onKeyDown = function (event) {
|
|
21881
22457
|
var originalEvent = event.args;
|
|
21882
|
-
if ((originalEvent.
|
|
22458
|
+
if ((originalEvent.altKey && originalEvent.shiftKey && (originalEvent.action === 'format-copy' || originalEvent.action === 'format-paste'))
|
|
21883
22459
|
|| (originalEvent.action === 'escape' && (this.previousAction === 'format-copy' || this.previousAction === 'format-paste'))) {
|
|
21884
|
-
if (
|
|
21885
|
-
originalEvent.
|
|
21886
|
-
}
|
|
21887
|
-
if (!isNullOrUndefined(originalEvent.key) && originalEvent.key.toLowerCase() === 'v' &&
|
|
21888
|
-
this.previousAction === 'format-copy' || this.previousAction === 'format-paste' || this.isSticky) {
|
|
21889
|
-
originalEvent.preventDefault();
|
|
22460
|
+
if ((originalEvent.action === 'format-copy' || originalEvent.action === 'format-paste')) {
|
|
22461
|
+
originalEvent.stopPropagation();
|
|
21890
22462
|
}
|
|
21891
22463
|
this.actionHandler(event, 'keyBoard');
|
|
21892
22464
|
}
|
|
@@ -21970,8 +22542,7 @@ var FormatPainter = /** @__PURE__ @class */ (function () {
|
|
|
21970
22542
|
}
|
|
21971
22543
|
};
|
|
21972
22544
|
FormatPainter.prototype.destroy = function () {
|
|
21973
|
-
|
|
21974
|
-
if (this.parent.isDestroyed) {
|
|
22545
|
+
if (isNullOrUndefined(this.parent) || this.parent.isDestroyed) {
|
|
21975
22546
|
return;
|
|
21976
22547
|
}
|
|
21977
22548
|
this.parent.off(formatPainterClick, this.toolbarClick);
|
|
@@ -21979,6 +22550,13 @@ var FormatPainter = /** @__PURE__ @class */ (function () {
|
|
|
21979
22550
|
this.parent.off(formatPainterDoubleClick, this.toolbarDoubleClick);
|
|
21980
22551
|
this.parent.off(keyDown, this.onKeyDown);
|
|
21981
22552
|
this.parent.off(destroy, this.destroy);
|
|
22553
|
+
if (!isNullOrUndefined(this.parent.formatter.editorManager.formatPainterEditor)) {
|
|
22554
|
+
this.parent.formatter.editorManager.formatPainterEditor.destroy();
|
|
22555
|
+
}
|
|
22556
|
+
this.parent = undefined;
|
|
22557
|
+
this.isSticky = undefined;
|
|
22558
|
+
this.isActive = undefined;
|
|
22559
|
+
this.previousAction = undefined;
|
|
21982
22560
|
};
|
|
21983
22561
|
/**
|
|
21984
22562
|
* For internal use only - Get the module name.
|
|
@@ -21992,6 +22570,778 @@ var FormatPainter = /** @__PURE__ @class */ (function () {
|
|
|
21992
22570
|
return FormatPainter;
|
|
21993
22571
|
}());
|
|
21994
22572
|
|
|
22573
|
+
var EmojiPicker = /** @__PURE__ @class */ (function () {
|
|
22574
|
+
function EmojiPicker(parent, serviceLocator) {
|
|
22575
|
+
this.parent = parent;
|
|
22576
|
+
this.locator = serviceLocator;
|
|
22577
|
+
this.i10n = serviceLocator.getService('rteLocale');
|
|
22578
|
+
this.renderFactory = this.locator.getService('rendererFactory');
|
|
22579
|
+
this.baseToolbar = new BaseToolbar(this.parent, this.locator);
|
|
22580
|
+
this.addEventListener();
|
|
22581
|
+
}
|
|
22582
|
+
/**
|
|
22583
|
+
* Destroys the Count.
|
|
22584
|
+
*
|
|
22585
|
+
* @function destroy
|
|
22586
|
+
* @returns {void}
|
|
22587
|
+
* @hidden
|
|
22588
|
+
* @deprecated
|
|
22589
|
+
*/
|
|
22590
|
+
EmojiPicker.prototype.destroy = function () {
|
|
22591
|
+
this.removeEventListener();
|
|
22592
|
+
};
|
|
22593
|
+
EmojiPicker.prototype.addEventListener = function () {
|
|
22594
|
+
this.parent.on(emojiPicker, this.toolbarClick, this);
|
|
22595
|
+
this.parent.on(docClick, this.docClick, this);
|
|
22596
|
+
this.parent.on(keyDown, this.onkeyPress, this);
|
|
22597
|
+
this.parent.on(keyUp, this.onkeyUp, this);
|
|
22598
|
+
this.parent.on(contentscroll, this.contentscroll, this);
|
|
22599
|
+
this.parent.on(scroll, this.contentscroll, this);
|
|
22600
|
+
};
|
|
22601
|
+
// eslint-disable-next-line
|
|
22602
|
+
EmojiPicker.prototype.toolbarClick = function (args) {
|
|
22603
|
+
var _this = this;
|
|
22604
|
+
var _a, _b;
|
|
22605
|
+
var spanElement = this.parent.element.querySelector('.e-emoji');
|
|
22606
|
+
this.divElement = spanElement.closest('div');
|
|
22607
|
+
var range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
22608
|
+
this.save = this.parent.formatter.editorManager.nodeSelection.save(range, this.parent.contentModule.getDocument());
|
|
22609
|
+
this.clickEvent = args.args;
|
|
22610
|
+
var emojiPicker$$1 = this.parent.emojiPickerSettings.iconsSet;
|
|
22611
|
+
if (this.popupObj) {
|
|
22612
|
+
removeClass([this.divElement], 'e-active');
|
|
22613
|
+
if (this.popupObj.element.querySelector('.e-rte-emoji-search') || !this.parent.emojiPickerSettings.showSearchBox) {
|
|
22614
|
+
this.popupObj.hide();
|
|
22615
|
+
return;
|
|
22616
|
+
}
|
|
22617
|
+
this.popupObj.hide();
|
|
22618
|
+
}
|
|
22619
|
+
this.popDiv = this.parent.createElement('div', { className: 'e-rte-emojipicker-popup', id: this.parent.getID() + '_emojiPicker' });
|
|
22620
|
+
this.parent.getToolbar().appendChild(this.popDiv);
|
|
22621
|
+
EventHandler.add(this.popDiv, 'keydown', this.onKeyDown, this);
|
|
22622
|
+
EventHandler.add(this.popDiv, 'keyup', this.searchFilter, this);
|
|
22623
|
+
var extendEle = this.parent.element.querySelector('.e-toolbar-extended');
|
|
22624
|
+
var zIndex;
|
|
22625
|
+
if (!isNullOrUndefined(extendEle)) {
|
|
22626
|
+
var computedStyle = window.getComputedStyle(extendEle);
|
|
22627
|
+
zIndex = computedStyle.getPropertyValue('z-index');
|
|
22628
|
+
}
|
|
22629
|
+
else {
|
|
22630
|
+
zIndex = '10001';
|
|
22631
|
+
}
|
|
22632
|
+
var target;
|
|
22633
|
+
var xValue;
|
|
22634
|
+
var yValue;
|
|
22635
|
+
if (!isNullOrUndefined(args.args)) {
|
|
22636
|
+
target = args.args.originalEvent.target;
|
|
22637
|
+
target = target.classList.contains('e-toolbar-item') ? target.firstChild : target.parentElement;
|
|
22638
|
+
xValue = 'left';
|
|
22639
|
+
yValue = 'bottom';
|
|
22640
|
+
}
|
|
22641
|
+
else if (isNullOrUndefined(args.x) && isNullOrUndefined(args.y)) {
|
|
22642
|
+
target = this.parent.inputElement;
|
|
22643
|
+
if (window.getSelection().rangeCount > 0) {
|
|
22644
|
+
var coordinates = this.getCoordinates();
|
|
22645
|
+
xValue = coordinates.left;
|
|
22646
|
+
yValue = coordinates.top;
|
|
22647
|
+
}
|
|
22648
|
+
}
|
|
22649
|
+
else {
|
|
22650
|
+
target = this.parent.inputElement;
|
|
22651
|
+
xValue = args.x;
|
|
22652
|
+
yValue = args.y;
|
|
22653
|
+
}
|
|
22654
|
+
this.popupObj = new Popup(this.popDiv, {
|
|
22655
|
+
targetType: 'relative',
|
|
22656
|
+
relateTo: target,
|
|
22657
|
+
collision: { X: 'fit', Y: 'none' },
|
|
22658
|
+
offsetY: 8,
|
|
22659
|
+
viewPortElement: this.parent.element,
|
|
22660
|
+
position: { X: xValue, Y: yValue },
|
|
22661
|
+
enableRtl: this.parent.enableRtl,
|
|
22662
|
+
zIndex: parseInt(zIndex, 10) + 1,
|
|
22663
|
+
actionOnScroll: 'hide',
|
|
22664
|
+
// eslint-disable-next-line
|
|
22665
|
+
close: function (event) {
|
|
22666
|
+
_this.parent.isBlur = false;
|
|
22667
|
+
_this.popupObj.destroy();
|
|
22668
|
+
detach(_this.popupObj.element);
|
|
22669
|
+
_this.popupObj = null;
|
|
22670
|
+
}
|
|
22671
|
+
});
|
|
22672
|
+
addClass([this.popupObj.element], 'e-popup-open');
|
|
22673
|
+
this.popupObj.refreshPosition(target);
|
|
22674
|
+
// header search element
|
|
22675
|
+
if ((!isNullOrUndefined(args.args) || (isNullOrUndefined(args.x) && isNullOrUndefined(args.y))) && this.parent.emojiPickerSettings.showSearchBox) {
|
|
22676
|
+
var inputEle = createElement('input', { id: 'e-rte-emoji-search', className: 'e-rte-emoji-search' });
|
|
22677
|
+
this.popDiv.append(inputEle);
|
|
22678
|
+
var inputobj = new TextBox({
|
|
22679
|
+
placeholder: this.i10n.getConstant('emojiPickerTypeToFind'),
|
|
22680
|
+
showClearButton: true
|
|
22681
|
+
});
|
|
22682
|
+
inputobj.appendTo(inputEle);
|
|
22683
|
+
inputEle.focus();
|
|
22684
|
+
}
|
|
22685
|
+
var closeIcon = this.popupObj.element.querySelector('.e-clear-icon');
|
|
22686
|
+
if (!isNullOrUndefined(closeIcon)) {
|
|
22687
|
+
EventHandler.add(closeIcon, 'mousedown', this.searchFilter, this);
|
|
22688
|
+
}
|
|
22689
|
+
// Header emoji toolbar div
|
|
22690
|
+
var emojiToolBar = this.parent.createElement('div', { className: 'e-rte-emojipicker-toolbar' });
|
|
22691
|
+
this.popDiv.appendChild(emojiToolBar);
|
|
22692
|
+
var pushToolBar = [];
|
|
22693
|
+
for (var i = 0; i < this.parent.emojiPickerSettings.iconsSet.length; i++) {
|
|
22694
|
+
if (!isNullOrUndefined(this.parent.emojiPickerSettings.iconsSet[i].iconCss)) {
|
|
22695
|
+
pushToolBar.push({ prefixIcon: this.parent.emojiPickerSettings.iconsSet[i].iconCss, htmlAttributes: (_a = {}, _a['title'] = this.parent.emojiPickerSettings.iconsSet[i].name, _a) });
|
|
22696
|
+
}
|
|
22697
|
+
else {
|
|
22698
|
+
pushToolBar.push({ text: '&#x' + this.parent.emojiPickerSettings.iconsSet[i].code + ';', htmlAttributes: (_b = {}, _b['title'] = this.parent.emojiPickerSettings.iconsSet[i].name, _b) });
|
|
22699
|
+
}
|
|
22700
|
+
}
|
|
22701
|
+
var toolbarObj = new Toolbar({
|
|
22702
|
+
items: pushToolBar,
|
|
22703
|
+
clicked: this.emojiToolbarClick.bind(this)
|
|
22704
|
+
});
|
|
22705
|
+
toolbarObj.appendTo(emojiToolBar);
|
|
22706
|
+
// emoji btn div
|
|
22707
|
+
var emojiBtnDiv = this.parent.createElement('div', { className: 'e-rte-emojipicker-btn' });
|
|
22708
|
+
this.popDiv.appendChild(emojiBtnDiv);
|
|
22709
|
+
var height;
|
|
22710
|
+
var popupBorder = window.getComputedStyle(this.popDiv);
|
|
22711
|
+
if ((isNullOrUndefined(args.args) && !(isNullOrUndefined(args.x) && isNullOrUndefined(args.y))) || !this.parent.emojiPickerSettings.showSearchBox) {
|
|
22712
|
+
height = (this.popDiv.getBoundingClientRect().height - emojiToolBar.getBoundingClientRect().height - (2 * parseFloat(popupBorder.borderWidth))) + 'px';
|
|
22713
|
+
emojiBtnDiv.style.setProperty('height', height, 'important');
|
|
22714
|
+
}
|
|
22715
|
+
else {
|
|
22716
|
+
var inputELe = this.parent.element.querySelector('.e-rte-emoji-search').parentElement;
|
|
22717
|
+
var getComputedStyle_1 = window.getComputedStyle(inputELe);
|
|
22718
|
+
height = (this.popDiv.getBoundingClientRect().height - emojiToolBar.getBoundingClientRect().height
|
|
22719
|
+
- inputELe.getBoundingClientRect().height
|
|
22720
|
+
- parseFloat(getComputedStyle_1.marginTop) - parseFloat(getComputedStyle_1.marginBottom)
|
|
22721
|
+
- (2 * parseFloat(popupBorder.borderWidth))) + 'px';
|
|
22722
|
+
emojiBtnDiv.style.setProperty('height', height, 'important');
|
|
22723
|
+
}
|
|
22724
|
+
for (var i = 0; i < emojiPicker$$1.length; i++) {
|
|
22725
|
+
var emojiGroupDiv = this.parent.createElement('div', { className: 'e-rte-emojipicker-group' });
|
|
22726
|
+
emojiBtnDiv.appendChild(emojiGroupDiv);
|
|
22727
|
+
var emojiName = this.parent.createElement('div', { className: 'e-rte-emojipicker-name' });
|
|
22728
|
+
emojiName.innerText = this.parent.emojiPickerSettings.iconsSet[i].name;
|
|
22729
|
+
emojiName.setAttribute('aria-label', this.parent.emojiPickerSettings.iconsSet[i].name);
|
|
22730
|
+
emojiGroupDiv.appendChild(emojiName);
|
|
22731
|
+
var emojiBtn = this.parent.createElement('div', { className: 'e-rte-emojipickerbtn-group' });
|
|
22732
|
+
emojiGroupDiv.appendChild(emojiBtn);
|
|
22733
|
+
for (var j = 0; j < emojiPicker$$1[i].icons.length; j++) {
|
|
22734
|
+
var button = this.parent.createElement('button', { className: 'e-btn ' + ' ' + 'e-control' });
|
|
22735
|
+
button.innerHTML = this.buttoncode(this.parent.emojiPickerSettings.iconsSet[i].icons[j].code);
|
|
22736
|
+
button.setAttribute('aria-label', (this.parent.emojiPickerSettings.iconsSet[i].icons[j].desc));
|
|
22737
|
+
button.setAttribute('title', (this.parent.emojiPickerSettings.iconsSet[i].icons[j].desc));
|
|
22738
|
+
emojiBtn.appendChild(button);
|
|
22739
|
+
if (button.innerHTML.length > 2) {
|
|
22740
|
+
button.style.fontSize = '17px';
|
|
22741
|
+
}
|
|
22742
|
+
}
|
|
22743
|
+
}
|
|
22744
|
+
EventHandler.add(emojiBtnDiv, 'scroll', this.scrollEvent, this);
|
|
22745
|
+
EventHandler.add(emojiBtnDiv, 'click', this.emojiBtnClick, this);
|
|
22746
|
+
var emojiButtons = this.parent.element.querySelectorAll('.e-rte-emojipicker-btn button');
|
|
22747
|
+
if (isNullOrUndefined(this.parent.element.querySelector('.e-rte-emoji-search')) && !isNullOrUndefined(args.args)) {
|
|
22748
|
+
emojiButtons[0].focus();
|
|
22749
|
+
addClass([emojiButtons[0]], 'e-focus');
|
|
22750
|
+
}
|
|
22751
|
+
var popup = this.parent.element.querySelector('.e-rte-emojipicker-btn');
|
|
22752
|
+
var toolbarName = this.parent.element.querySelectorAll('.e-rte-emojipicker-toolbar button');
|
|
22753
|
+
var scrollTop;
|
|
22754
|
+
if (!isNullOrUndefined(popup)) {
|
|
22755
|
+
scrollTop = Math.round(popup.scrollTop);
|
|
22756
|
+
}
|
|
22757
|
+
for (var i = 0; i < toolbarName.length; i++) {
|
|
22758
|
+
/* eslint-disable */
|
|
22759
|
+
if (toolbarName[i].classList.contains('e-selected')) {
|
|
22760
|
+
removeClass([toolbarName[i]], 'e-selected');
|
|
22761
|
+
}
|
|
22762
|
+
/* eslint-enable */
|
|
22763
|
+
}
|
|
22764
|
+
if (scrollTop < toolbarName[0].offsetHeight) {
|
|
22765
|
+
addClass([toolbarName[0]], 'e-selected');
|
|
22766
|
+
}
|
|
22767
|
+
if (this.popupObj) {
|
|
22768
|
+
addClass([this.divElement], 'e-active');
|
|
22769
|
+
}
|
|
22770
|
+
};
|
|
22771
|
+
EmojiPicker.prototype.buttoncode = function (value) {
|
|
22772
|
+
var valueLength = value.split('-');
|
|
22773
|
+
// eslint-disable-next-line
|
|
22774
|
+
var joinedEmoji = valueLength.map(function (cp) { return String.fromCodePoint(parseInt(cp, 16)); }).join('\u200D');
|
|
22775
|
+
return joinedEmoji;
|
|
22776
|
+
};
|
|
22777
|
+
EmojiPicker.prototype.docClick = function (e) {
|
|
22778
|
+
var target = e.args.target;
|
|
22779
|
+
if (target && target.classList && ((this.popupObj && !closest(target, '[id=' + '\'' + this.popupObj.element.id + '\'' + ']')))
|
|
22780
|
+
&& (!target.classList.contains('e-emoji') && !target.classList.contains('e-toolbar-item'))) {
|
|
22781
|
+
if (this.popupObj) {
|
|
22782
|
+
removeClass([this.divElement], 'e-active');
|
|
22783
|
+
this.popupObj.hide();
|
|
22784
|
+
}
|
|
22785
|
+
}
|
|
22786
|
+
};
|
|
22787
|
+
EmojiPicker.prototype.scrollEvent = function () {
|
|
22788
|
+
var popup = this.parent.element.querySelector('.e-rte-emojipicker-btn');
|
|
22789
|
+
var emojiSet = this.parent.element.querySelectorAll('.e-rte-emojipicker-group');
|
|
22790
|
+
var toolbarName = this.parent.element.querySelectorAll('.e-rte-emojipicker-toolbar button');
|
|
22791
|
+
var scrollTop;
|
|
22792
|
+
if (!isNullOrUndefined(popup)) {
|
|
22793
|
+
scrollTop = Math.round(popup.scrollTop);
|
|
22794
|
+
}
|
|
22795
|
+
var firstSetWidth = 0;
|
|
22796
|
+
for (var j = 0; j < toolbarName.length; j++) {
|
|
22797
|
+
if (scrollTop < toolbarName[0].offsetHeight) {
|
|
22798
|
+
if (!isNullOrUndefined(toolbarName[j + 1])) {
|
|
22799
|
+
removeClass([toolbarName[j + 1]], 'e-selected');
|
|
22800
|
+
}
|
|
22801
|
+
addClass([toolbarName[0]], 'e-selected');
|
|
22802
|
+
}
|
|
22803
|
+
}
|
|
22804
|
+
for (var i = 0; i < emojiSet.length; i++) {
|
|
22805
|
+
// eslint-disable-next-line
|
|
22806
|
+
firstSetWidth += Math.round(emojiSet[i].offsetHeight);
|
|
22807
|
+
if (scrollTop >= firstSetWidth) {
|
|
22808
|
+
for (var k = 0; k < toolbarName.length; k++) {
|
|
22809
|
+
/* eslint-disable */
|
|
22810
|
+
if (toolbarName[k].classList.contains('e-selected')) {
|
|
22811
|
+
removeClass([toolbarName[k]], 'e-selected');
|
|
22812
|
+
}
|
|
22813
|
+
/* eslint-enable */
|
|
22814
|
+
}
|
|
22815
|
+
if (!isNullOrUndefined(toolbarName[i + 1])) {
|
|
22816
|
+
addClass([toolbarName[i + 1]], 'e-selected');
|
|
22817
|
+
}
|
|
22818
|
+
}
|
|
22819
|
+
}
|
|
22820
|
+
};
|
|
22821
|
+
EmojiPicker.prototype.contentscroll = function () {
|
|
22822
|
+
if (isNullOrUndefined(this.clickEvent) && this.popupObj) {
|
|
22823
|
+
removeClass([this.divElement], 'e-active');
|
|
22824
|
+
this.popupObj.hide();
|
|
22825
|
+
return;
|
|
22826
|
+
}
|
|
22827
|
+
};
|
|
22828
|
+
EmojiPicker.prototype.emojiToolbarClick = function (e) {
|
|
22829
|
+
var args = {
|
|
22830
|
+
// eslint-disable-next-line
|
|
22831
|
+
text: e.item.htmlAttributes.title,
|
|
22832
|
+
};
|
|
22833
|
+
var currentEleName = args.text;
|
|
22834
|
+
var emojiGroups = this.parent.element.querySelectorAll('.e-rte-emojipicker-group');
|
|
22835
|
+
var emojiButtons = this.parent.element.querySelectorAll('.e-rte-emojipicker-btn button');
|
|
22836
|
+
var toolbarName = this.parent.element.querySelectorAll('.e-rte-emojipicker-toolbar button');
|
|
22837
|
+
for (var i = 0; i < toolbarName.length; i++) {
|
|
22838
|
+
/* eslint-disable */
|
|
22839
|
+
if (toolbarName[i].classList.contains('e-selected')) {
|
|
22840
|
+
removeClass([toolbarName[i]], 'e-selected');
|
|
22841
|
+
}
|
|
22842
|
+
/* eslint-enable */
|
|
22843
|
+
}
|
|
22844
|
+
for (var i = 0; i < emojiButtons.length; i++) {
|
|
22845
|
+
if (emojiButtons[i].classList.contains('e-focus')) {
|
|
22846
|
+
removeClass([emojiButtons[i]], 'e-focus');
|
|
22847
|
+
}
|
|
22848
|
+
}
|
|
22849
|
+
// Loop through the selected elements and perform the same operation on each element
|
|
22850
|
+
var emojiGroupsheight = this.parent.element.querySelector('.e-rte-emojipicker-btn');
|
|
22851
|
+
var emojiHeight = 0;
|
|
22852
|
+
// eslint-disable-next-line
|
|
22853
|
+
emojiGroups.forEach(function (group) {
|
|
22854
|
+
var childNodes = group.childNodes[0];
|
|
22855
|
+
var focusBtn = group.childNodes[1].childNodes[0];
|
|
22856
|
+
var ariaLabel = childNodes.getAttribute('aria-label');
|
|
22857
|
+
if (currentEleName === ariaLabel) {
|
|
22858
|
+
if (childNodes) {
|
|
22859
|
+
emojiGroupsheight.scrollTop = emojiHeight + 10;
|
|
22860
|
+
addClass([focusBtn], 'e-focus');
|
|
22861
|
+
focusBtn.focus();
|
|
22862
|
+
}
|
|
22863
|
+
}
|
|
22864
|
+
else {
|
|
22865
|
+
emojiHeight += group.scrollHeight;
|
|
22866
|
+
removeClass([focusBtn], 'e-focus');
|
|
22867
|
+
}
|
|
22868
|
+
});
|
|
22869
|
+
};
|
|
22870
|
+
EmojiPicker.prototype.onKeyDown = function (e) {
|
|
22871
|
+
// Select all emoji buttons
|
|
22872
|
+
var emojiButtons = this.parent.element.querySelectorAll('.e-rte-emojipicker-btn button');
|
|
22873
|
+
var emojiGroups = this.parent.element.querySelectorAll('.e-rte-emojipickerbtn-group');
|
|
22874
|
+
var searchKeyHandler = this.parent.element.querySelector('.e-rte-emojisearch-btn button');
|
|
22875
|
+
if (e.keyCode === 27) {
|
|
22876
|
+
if (this.popupObj) {
|
|
22877
|
+
removeClass([this.divElement], 'e-active');
|
|
22878
|
+
this.popupObj.hide();
|
|
22879
|
+
}
|
|
22880
|
+
}
|
|
22881
|
+
if (e.keyCode === 13) {
|
|
22882
|
+
var activeEle = document.activeElement;
|
|
22883
|
+
if (activeEle.classList.contains('e-btn')) {
|
|
22884
|
+
this.emojiBtnClick(e);
|
|
22885
|
+
e.preventDefault();
|
|
22886
|
+
}
|
|
22887
|
+
}
|
|
22888
|
+
var srcElement = e.srcElement;
|
|
22889
|
+
if (!isNullOrUndefined(srcElement)) {
|
|
22890
|
+
if (srcElement.classList.contains('e-rte-emoji-search') && e.keyCode === 40) {
|
|
22891
|
+
for (var i = 0; i < emojiButtons.length; i++) {
|
|
22892
|
+
if (emojiButtons[i].classList.contains('e-focus')) {
|
|
22893
|
+
removeClass([emojiButtons[i]], 'e-focus');
|
|
22894
|
+
}
|
|
22895
|
+
}
|
|
22896
|
+
}
|
|
22897
|
+
}
|
|
22898
|
+
if (!isNullOrUndefined(searchKeyHandler)) {
|
|
22899
|
+
this.filterKeyHandler(e);
|
|
22900
|
+
}
|
|
22901
|
+
else {
|
|
22902
|
+
for (var i = 0; i < emojiButtons.length; i++) {
|
|
22903
|
+
var focusIndex = i;
|
|
22904
|
+
if (emojiButtons[i].classList.contains('e-focus')) {
|
|
22905
|
+
if (e.keyCode === 40) {
|
|
22906
|
+
// Move focus to next row if there is one
|
|
22907
|
+
if (emojiButtons.length - 4 > i) {
|
|
22908
|
+
var count$$1 = 0;
|
|
22909
|
+
for (var j = 0; j < emojiGroups.length; j++) {
|
|
22910
|
+
for (var k = 0; k < emojiGroups[j].childNodes.length; k++) {
|
|
22911
|
+
// eslint-disable-next-line
|
|
22912
|
+
var childNodes = emojiGroups[j].childNodes[k];
|
|
22913
|
+
if (childNodes.classList.contains('e-focus') && count$$1 !== 1) {
|
|
22914
|
+
var currentIndex = k;
|
|
22915
|
+
var lastChild = emojiGroups[j].lastChild;
|
|
22916
|
+
var lastRowIndex = Math.floor((k) % 6);
|
|
22917
|
+
var lastEleLength = emojiGroups[j].childNodes.length - 1;
|
|
22918
|
+
var lastEleIndex = Math.floor((lastEleLength) % 6);
|
|
22919
|
+
if (currentIndex !== -1) {
|
|
22920
|
+
var nextRowIndex = currentIndex + 6;
|
|
22921
|
+
if (!isNullOrUndefined(emojiGroups[j].childNodes[nextRowIndex])) {
|
|
22922
|
+
// next row has six buttons
|
|
22923
|
+
// handle focus change here
|
|
22924
|
+
var firstFocusEle = emojiButtons[i];
|
|
22925
|
+
removeClass([firstFocusEle], 'e-focus');
|
|
22926
|
+
var focusEle = emojiButtons[focusIndex += 6];
|
|
22927
|
+
addClass([focusEle], 'e-focus');
|
|
22928
|
+
focusEle.focus();
|
|
22929
|
+
break;
|
|
22930
|
+
}
|
|
22931
|
+
else if (isNullOrUndefined(emojiGroups[j].childNodes[nextRowIndex]) && !lastChild.classList.contains('e-focus') && lastEleIndex < lastRowIndex) {
|
|
22932
|
+
var firstFocusEle = emojiButtons[i];
|
|
22933
|
+
removeClass([firstFocusEle], 'e-focus');
|
|
22934
|
+
var focusEle = emojiGroups[j].lastChild;
|
|
22935
|
+
addClass([focusEle], 'e-focus');
|
|
22936
|
+
focusEle.focus();
|
|
22937
|
+
count$$1 = 1;
|
|
22938
|
+
break;
|
|
22939
|
+
}
|
|
22940
|
+
else {
|
|
22941
|
+
var firstFocusEle = emojiButtons[i];
|
|
22942
|
+
removeClass([firstFocusEle], 'e-focus');
|
|
22943
|
+
var focusEle = emojiGroups[j + 1]
|
|
22944
|
+
.childNodes[lastRowIndex];
|
|
22945
|
+
addClass([focusEle], 'e-focus');
|
|
22946
|
+
focusEle.focus();
|
|
22947
|
+
count$$1 = 1;
|
|
22948
|
+
break;
|
|
22949
|
+
}
|
|
22950
|
+
}
|
|
22951
|
+
}
|
|
22952
|
+
}
|
|
22953
|
+
}
|
|
22954
|
+
break;
|
|
22955
|
+
}
|
|
22956
|
+
}
|
|
22957
|
+
else if (e.keyCode === 38) {
|
|
22958
|
+
// Move focus to previous row if there is one
|
|
22959
|
+
if (i >= 6) {
|
|
22960
|
+
var count$$1 = 0;
|
|
22961
|
+
for (var j = 0; j < emojiGroups.length; j++) {
|
|
22962
|
+
for (var k = 0; k < emojiGroups[j].childNodes.length; k++) {
|
|
22963
|
+
var childNodes = emojiGroups[j].childNodes[k];
|
|
22964
|
+
if (childNodes.classList.contains('e-focus') && count$$1 !== 1) {
|
|
22965
|
+
// eslint-disable-next-line
|
|
22966
|
+
var currentIndex = k;
|
|
22967
|
+
var previousRowLength = isNullOrUndefined(emojiGroups[j - 1]) ? null :
|
|
22968
|
+
emojiGroups[j - 1].childNodes.length % 6 || 6;
|
|
22969
|
+
if (currentIndex !== -1) {
|
|
22970
|
+
var previousRowIndex = currentIndex - 6;
|
|
22971
|
+
if (!isNullOrUndefined(emojiGroups[j].childNodes[previousRowIndex])) {
|
|
22972
|
+
// previous row has six buttons
|
|
22973
|
+
// handle focus change here
|
|
22974
|
+
var firstFocusEle = emojiButtons[i];
|
|
22975
|
+
removeClass([firstFocusEle], 'e-focus');
|
|
22976
|
+
var focusEle = emojiButtons[focusIndex -= 6];
|
|
22977
|
+
addClass([focusEle], 'e-focus');
|
|
22978
|
+
focusEle.focus();
|
|
22979
|
+
break;
|
|
22980
|
+
}
|
|
22981
|
+
else if (isNullOrUndefined(emojiGroups[j - 1].childNodes[emojiGroups[j - 1]
|
|
22982
|
+
.childNodes.length - (previousRowLength - k)])) {
|
|
22983
|
+
var firstFocusEle = emojiButtons[i];
|
|
22984
|
+
removeClass([firstFocusEle], 'e-focus');
|
|
22985
|
+
var focusEle = emojiGroups[j - 1].lastChild;
|
|
22986
|
+
addClass([focusEle], 'e-focus');
|
|
22987
|
+
focusEle.focus();
|
|
22988
|
+
count$$1 = 1;
|
|
22989
|
+
break;
|
|
22990
|
+
}
|
|
22991
|
+
else {
|
|
22992
|
+
// previous row has less than six buttons
|
|
22993
|
+
// handle focus change here
|
|
22994
|
+
var firstFocusEle = emojiButtons[i];
|
|
22995
|
+
removeClass([firstFocusEle], 'e-focus');
|
|
22996
|
+
var focusEle = emojiGroups[j - 1].childNodes[emojiGroups[j - 1].
|
|
22997
|
+
childNodes.length - (previousRowLength - k)];
|
|
22998
|
+
addClass([focusEle], 'e-focus');
|
|
22999
|
+
focusEle.focus();
|
|
23000
|
+
count$$1 = 1;
|
|
23001
|
+
break;
|
|
23002
|
+
}
|
|
23003
|
+
}
|
|
23004
|
+
}
|
|
23005
|
+
}
|
|
23006
|
+
}
|
|
23007
|
+
}
|
|
23008
|
+
else {
|
|
23009
|
+
var firstFocusEle = emojiButtons[i];
|
|
23010
|
+
removeClass([firstFocusEle], 'e-focus');
|
|
23011
|
+
var focusEle = emojiButtons[focusIndex -= 1];
|
|
23012
|
+
var inputELe = this.popupObj.element.querySelector('.e-rte-emoji-search');
|
|
23013
|
+
if (isNullOrUndefined(focusEle) && !isNullOrUndefined(inputELe)) {
|
|
23014
|
+
inputELe.focus();
|
|
23015
|
+
break;
|
|
23016
|
+
}
|
|
23017
|
+
addClass([focusEle], 'e-focus');
|
|
23018
|
+
focusEle.focus();
|
|
23019
|
+
}
|
|
23020
|
+
break;
|
|
23021
|
+
}
|
|
23022
|
+
else if (e.keyCode === 39) {
|
|
23023
|
+
// Move focus to next button in current row
|
|
23024
|
+
if (emojiButtons.length !== i + 1) {
|
|
23025
|
+
var firstFocusEle = emojiButtons[i];
|
|
23026
|
+
removeClass([firstFocusEle], 'e-focus');
|
|
23027
|
+
var focusEle = emojiButtons[focusIndex += 1];
|
|
23028
|
+
addClass([focusEle], 'e-focus');
|
|
23029
|
+
emojiButtons[focusIndex].focus();
|
|
23030
|
+
}
|
|
23031
|
+
break;
|
|
23032
|
+
}
|
|
23033
|
+
else if (e.keyCode === 37) {
|
|
23034
|
+
// Move focus to previous button in current row
|
|
23035
|
+
if (i > 0) {
|
|
23036
|
+
var firstFocusEle = emojiButtons[i];
|
|
23037
|
+
removeClass([firstFocusEle], 'e-focus');
|
|
23038
|
+
var focusEle = emojiButtons[focusIndex -= 1];
|
|
23039
|
+
addClass([focusEle], 'e-focus');
|
|
23040
|
+
emojiButtons[focusIndex].focus();
|
|
23041
|
+
}
|
|
23042
|
+
break;
|
|
23043
|
+
}
|
|
23044
|
+
}
|
|
23045
|
+
}
|
|
23046
|
+
}
|
|
23047
|
+
if (e.keyCode === 40) {
|
|
23048
|
+
var firstFocusEle = this.parent.element.querySelector('.e-focus');
|
|
23049
|
+
if (isNullOrUndefined(firstFocusEle)) {
|
|
23050
|
+
var focusEle = emojiButtons[0];
|
|
23051
|
+
addClass([focusEle], 'e-focus');
|
|
23052
|
+
emojiButtons[0].focus();
|
|
23053
|
+
}
|
|
23054
|
+
}
|
|
23055
|
+
};
|
|
23056
|
+
EmojiPicker.prototype.filterKeyHandler = function (e) {
|
|
23057
|
+
var emojiButtons = this.parent.element.querySelectorAll('.e-rte-emojisearch-btn button');
|
|
23058
|
+
var firstFocusEle = this.parent.element.querySelector('.e-focus');
|
|
23059
|
+
if (isNullOrUndefined(firstFocusEle) && e.keyCode === 40) {
|
|
23060
|
+
var focusEle = emojiButtons[0];
|
|
23061
|
+
addClass([focusEle], 'e-focus');
|
|
23062
|
+
emojiButtons[0].focus();
|
|
23063
|
+
}
|
|
23064
|
+
else {
|
|
23065
|
+
for (var i = 0; i < emojiButtons.length; i++) {
|
|
23066
|
+
var focusIndex = i;
|
|
23067
|
+
// eslint-disable-next-line
|
|
23068
|
+
var childNodes = emojiButtons[i];
|
|
23069
|
+
if (childNodes.classList.contains('e-focus')) {
|
|
23070
|
+
if (e.keyCode === 38) {
|
|
23071
|
+
if (i >= 6) {
|
|
23072
|
+
var firstFocusEle_1 = emojiButtons[i];
|
|
23073
|
+
removeClass([firstFocusEle_1], 'e-focus');
|
|
23074
|
+
var focusEle = emojiButtons[focusIndex -= 6];
|
|
23075
|
+
addClass([focusEle], 'e-focus');
|
|
23076
|
+
focusEle.focus();
|
|
23077
|
+
break;
|
|
23078
|
+
}
|
|
23079
|
+
else {
|
|
23080
|
+
var firstFocusEle_2 = emojiButtons[i];
|
|
23081
|
+
removeClass([firstFocusEle_2], 'e-focus');
|
|
23082
|
+
var focusEle = emojiButtons[focusIndex -= 1];
|
|
23083
|
+
var inputELe = this.popupObj.element.querySelector('.e-rte-emoji-search');
|
|
23084
|
+
if (isNullOrUndefined(focusEle) && !isNullOrUndefined(inputELe)) {
|
|
23085
|
+
inputELe.focus();
|
|
23086
|
+
break;
|
|
23087
|
+
}
|
|
23088
|
+
addClass([focusEle], 'e-focus');
|
|
23089
|
+
focusEle.focus();
|
|
23090
|
+
}
|
|
23091
|
+
}
|
|
23092
|
+
else if (e.keyCode === 40) {
|
|
23093
|
+
if (emojiButtons.length - 6 > i) {
|
|
23094
|
+
var firstFocusEle_3 = emojiButtons[i];
|
|
23095
|
+
removeClass([firstFocusEle_3], 'e-focus');
|
|
23096
|
+
var focusEle = emojiButtons[focusIndex += 6];
|
|
23097
|
+
addClass([focusEle], 'e-focus');
|
|
23098
|
+
focusEle.focus();
|
|
23099
|
+
break;
|
|
23100
|
+
}
|
|
23101
|
+
}
|
|
23102
|
+
else if (e.keyCode === 39) {
|
|
23103
|
+
if (emojiButtons.length !== i + 1) {
|
|
23104
|
+
var firstFocusEle_4 = emojiButtons[i];
|
|
23105
|
+
removeClass([firstFocusEle_4], 'e-focus');
|
|
23106
|
+
var focusEle = emojiButtons[focusIndex += 1];
|
|
23107
|
+
addClass([focusEle], 'e-focus');
|
|
23108
|
+
emojiButtons[focusIndex].focus();
|
|
23109
|
+
}
|
|
23110
|
+
break;
|
|
23111
|
+
}
|
|
23112
|
+
else if (e.keyCode === 37) {
|
|
23113
|
+
if (i > 0) {
|
|
23114
|
+
var firstFocusEle_5 = emojiButtons[i];
|
|
23115
|
+
removeClass([firstFocusEle_5], 'e-focus');
|
|
23116
|
+
var focusEle = emojiButtons[focusIndex -= 1];
|
|
23117
|
+
addClass([focusEle], 'e-focus');
|
|
23118
|
+
emojiButtons[focusIndex].focus();
|
|
23119
|
+
break;
|
|
23120
|
+
}
|
|
23121
|
+
}
|
|
23122
|
+
}
|
|
23123
|
+
}
|
|
23124
|
+
}
|
|
23125
|
+
};
|
|
23126
|
+
EmojiPicker.prototype.searchFilter = function (e, value) {
|
|
23127
|
+
var inputElement = this.parent.element.querySelector('.e-rte-emoji-search');
|
|
23128
|
+
var contentELe = this.parent.element.querySelector('.e-content');
|
|
23129
|
+
if (document.activeElement === inputElement || document.activeElement === contentELe) {
|
|
23130
|
+
var trimmedStr = void 0;
|
|
23131
|
+
if (value !== ':' && !isNullOrUndefined(value)) {
|
|
23132
|
+
trimmedStr = value.replace(/^:/, '');
|
|
23133
|
+
}
|
|
23134
|
+
else if (!isNullOrUndefined(value)) {
|
|
23135
|
+
trimmedStr = value;
|
|
23136
|
+
}
|
|
23137
|
+
var inputValue = isNullOrUndefined(inputElement) ? trimmedStr : inputElement.value;
|
|
23138
|
+
var emojiButtons = this.parent.element.querySelectorAll('.e-rte-emojipicker-btn button');
|
|
23139
|
+
var emojipickerAll = this.parent.element.querySelector('.e-rte-emojipicker-btn');
|
|
23140
|
+
var emojiGroups = this.parent.element.querySelectorAll('.e-rte-emojipicker-group');
|
|
23141
|
+
var toolbarGroup = this.parent.element.querySelector('.e-rte-emojipicker-toolbar');
|
|
23142
|
+
var excludedDiv_1 = this.parent.element.querySelector('.e-rte-emojisearch-btn');
|
|
23143
|
+
var firstChild = this.popDiv.childNodes[0];
|
|
23144
|
+
var getComputedStyle_2 = window.getComputedStyle(firstChild);
|
|
23145
|
+
var inputHeight = firstChild.nodeName === 'SPAN' ? (firstChild.getBoundingClientRect().height + parseFloat(getComputedStyle_2.marginTop) +
|
|
23146
|
+
parseFloat(getComputedStyle_2.marginBottom)) : 0;
|
|
23147
|
+
var popupBorder = window.getComputedStyle(this.popDiv);
|
|
23148
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
23149
|
+
var filteredButtons = isNullOrUndefined(excludedDiv_1) ? emojiButtons :
|
|
23150
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
23151
|
+
Array.from(emojiButtons).filter(function (button) { return !excludedDiv_1.contains(button); });
|
|
23152
|
+
if (inputValue === '' || value === ':') {
|
|
23153
|
+
toolbarGroup.style.display = '';
|
|
23154
|
+
emojipickerAll.style.height = (this.popDiv.getBoundingClientRect().height - toolbarGroup.getBoundingClientRect().height - inputHeight - (2 * parseFloat(popupBorder.borderWidth))) + 'px';
|
|
23155
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
23156
|
+
emojiGroups.forEach(function (element) {
|
|
23157
|
+
element.style.display = '';
|
|
23158
|
+
});
|
|
23159
|
+
}
|
|
23160
|
+
else {
|
|
23161
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
23162
|
+
emojiGroups.forEach(function (element) {
|
|
23163
|
+
element.style.display = 'none';
|
|
23164
|
+
});
|
|
23165
|
+
toolbarGroup.style.display = 'none';
|
|
23166
|
+
emojipickerAll.style.height = (this.popDiv.getBoundingClientRect().height - inputHeight - (2 * parseFloat(popupBorder.borderWidth))) + 'px';
|
|
23167
|
+
}
|
|
23168
|
+
var emojiBtnDiv = this.parent.createElement('div', { className: 'e-rte-emojisearch-btn' });
|
|
23169
|
+
var emojis = this.parent.element.querySelector('.e-rte-emojisearch-btn');
|
|
23170
|
+
if (emojis) {
|
|
23171
|
+
emojis.remove();
|
|
23172
|
+
}
|
|
23173
|
+
var noEmojiObj = this.parent.createElement('div', { className: 'e-rte-emojiSearch-noEmoji' });
|
|
23174
|
+
var noEMoji = true;
|
|
23175
|
+
for (var i = 0; i < filteredButtons.length; i++) {
|
|
23176
|
+
if (!isNullOrUndefined(filteredButtons[i].getAttribute('title'))) {
|
|
23177
|
+
var title = filteredButtons[i].getAttribute('title').toLowerCase();
|
|
23178
|
+
var titleLength = title.split(' ');
|
|
23179
|
+
for (var j = 0; j < titleLength.length; j++) {
|
|
23180
|
+
if (titleLength[j].startsWith(inputValue.toLowerCase()) && inputValue !== '') {
|
|
23181
|
+
var emoji = filteredButtons[i].cloneNode(true);
|
|
23182
|
+
emojiBtnDiv.appendChild(emoji);
|
|
23183
|
+
noEMoji = false;
|
|
23184
|
+
break;
|
|
23185
|
+
}
|
|
23186
|
+
}
|
|
23187
|
+
}
|
|
23188
|
+
}
|
|
23189
|
+
if (noEMoji && !this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji') && (inputValue !== '' && value !== ':')) {
|
|
23190
|
+
noEmojiObj.innerHTML = '<span style="color: rgba(0, 0, 0, 0.75); font-weight: 500; font-size: 16px;">' + this.i10n.getConstant('emojiPickerNoResultFound') + ' 😥 </span>' + '<br>' + '<span style="color: rgba(0, 0, 0, 0.75);"> ' + this.i10n.getConstant('emojiPickerTrySomethingElse') + ' ? </span>';
|
|
23191
|
+
noEmojiObj.style.margin = '55px';
|
|
23192
|
+
emojipickerAll.appendChild(noEmojiObj);
|
|
23193
|
+
}
|
|
23194
|
+
else if (!noEMoji && this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji') || (inputValue === '' && value === ':')) {
|
|
23195
|
+
emojipickerAll.removeChild(this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji'));
|
|
23196
|
+
}
|
|
23197
|
+
emojipickerAll.appendChild(emojiBtnDiv);
|
|
23198
|
+
}
|
|
23199
|
+
else {
|
|
23200
|
+
return;
|
|
23201
|
+
}
|
|
23202
|
+
};
|
|
23203
|
+
EmojiPicker.prototype.emojiBtnClick = function (e) {
|
|
23204
|
+
var event = new MouseEvent('mouseleave', { bubbles: true, cancelable: true });
|
|
23205
|
+
// Includes the emote button element tooltip and toolbar tooltip
|
|
23206
|
+
var emotePickerTooltips = this.parent.element.querySelectorAll('.e-rte-emojipicker-popup [data-tooltip-id]');
|
|
23207
|
+
for (var i = 0; i < emotePickerTooltips.length; i++) {
|
|
23208
|
+
emotePickerTooltips[i].dispatchEvent(event);
|
|
23209
|
+
}
|
|
23210
|
+
var targetEle = e.target;
|
|
23211
|
+
if (targetEle.tagName !== 'BUTTON') {
|
|
23212
|
+
return;
|
|
23213
|
+
}
|
|
23214
|
+
targetEle.focus();
|
|
23215
|
+
if (!isNullOrUndefined(this.clickEvent)) {
|
|
23216
|
+
this.save.restore();
|
|
23217
|
+
}
|
|
23218
|
+
if (this.popupObj) {
|
|
23219
|
+
removeClass([this.divElement], 'e-active');
|
|
23220
|
+
this.popupObj.hide();
|
|
23221
|
+
}
|
|
23222
|
+
var originalEvent = e;
|
|
23223
|
+
this.parent.formatter.process(this.parent, {
|
|
23224
|
+
item: {
|
|
23225
|
+
'command': 'EmojiPicker',
|
|
23226
|
+
'subCommand': 'EmojiPicker',
|
|
23227
|
+
value: targetEle.innerHTML
|
|
23228
|
+
}
|
|
23229
|
+
}, e, originalEvent);
|
|
23230
|
+
};
|
|
23231
|
+
EmojiPicker.prototype.onkeyPress = function (e) {
|
|
23232
|
+
var originalEvent = e.args;
|
|
23233
|
+
var selection = window.getSelection();
|
|
23234
|
+
if (selection.rangeCount <= 0) {
|
|
23235
|
+
return;
|
|
23236
|
+
}
|
|
23237
|
+
var range = selection.getRangeAt(0);
|
|
23238
|
+
var cursorPos = range.startOffset;
|
|
23239
|
+
var prevChar = selection.focusNode.textContent.substring(cursorPos - 1, cursorPos);
|
|
23240
|
+
var isPrevSpace = /\s/.test(prevChar);
|
|
23241
|
+
var isPrevColon = selection.focusNode.textContent.substring(cursorPos - 1, cursorPos) === ':';
|
|
23242
|
+
var colon = selection.focusNode.textContent.charAt(cursorPos - 1) === ':';
|
|
23243
|
+
if (originalEvent.keyCode === 186 && originalEvent.shiftKey && (isPrevSpace || selection.focusOffset === 0)) {
|
|
23244
|
+
var coordinates = this.getCoordinates();
|
|
23245
|
+
this.parent.showEmojiPicker(coordinates.left, coordinates.top);
|
|
23246
|
+
}
|
|
23247
|
+
if (originalEvent.keyCode === 8 && colon && this.popupObj) {
|
|
23248
|
+
removeClass([this.divElement], 'e-active');
|
|
23249
|
+
this.popupObj.hide();
|
|
23250
|
+
}
|
|
23251
|
+
if (originalEvent.keyCode === 32 && isPrevColon && this.popupObj) {
|
|
23252
|
+
removeClass([this.divElement], 'e-active');
|
|
23253
|
+
this.popupObj.hide();
|
|
23254
|
+
}
|
|
23255
|
+
if (this.popupObj && (originalEvent.keyCode === 37 || originalEvent.keyCode === 38 || originalEvent.keyCode === 39
|
|
23256
|
+
|| originalEvent.keyCode === 27 || originalEvent.keyCode === 40)) {
|
|
23257
|
+
this.onKeyDown(originalEvent);
|
|
23258
|
+
originalEvent.preventDefault();
|
|
23259
|
+
}
|
|
23260
|
+
};
|
|
23261
|
+
EmojiPicker.prototype.onkeyUp = function (e) {
|
|
23262
|
+
var originalEvent = e.args;
|
|
23263
|
+
var selection = window.getSelection();
|
|
23264
|
+
var range = selection.getRangeAt(0);
|
|
23265
|
+
var cursorPos = range.startOffset;
|
|
23266
|
+
// eslint-disable-next-line
|
|
23267
|
+
var selectedValue;
|
|
23268
|
+
var count$$1 = 0;
|
|
23269
|
+
for (var i = cursorPos - 1; i >= cursorPos - 15; i--) {
|
|
23270
|
+
var prevChar = selection.focusNode.textContent.substring(i - 1, i);
|
|
23271
|
+
var isPrevSpace = /:$/.test(prevChar);
|
|
23272
|
+
if (isPrevSpace && !isNullOrUndefined(this.popDiv) && count$$1 === 0) {
|
|
23273
|
+
selectedValue = range.startContainer.textContent.substring(i - 1, cursorPos);
|
|
23274
|
+
this.searchFilter(originalEvent, selectedValue);
|
|
23275
|
+
count$$1 = 1;
|
|
23276
|
+
}
|
|
23277
|
+
}
|
|
23278
|
+
var colon = selection.focusNode.textContent.substring(cursorPos - 1, cursorPos);
|
|
23279
|
+
if (colon === ':' && !isNullOrUndefined(this.popupObj)) {
|
|
23280
|
+
selectedValue = colon;
|
|
23281
|
+
this.searchFilter(originalEvent, selectedValue);
|
|
23282
|
+
}
|
|
23283
|
+
};
|
|
23284
|
+
EmojiPicker.prototype.getCoordinates = function () {
|
|
23285
|
+
var coordinates;
|
|
23286
|
+
var selection = window.getSelection();
|
|
23287
|
+
var range = selection.getRangeAt(0);
|
|
23288
|
+
var firstChild;
|
|
23289
|
+
if (range.startContainer.nodeName === 'P' || range.startContainer.nodeName === 'DIV') {
|
|
23290
|
+
if (range.startContainer.childNodes[0].nodeName !== '#text') {
|
|
23291
|
+
firstChild = range.startContainer.childNodes[0];
|
|
23292
|
+
}
|
|
23293
|
+
}
|
|
23294
|
+
// eslint-disable-next-line
|
|
23295
|
+
var rect = isNullOrUndefined(firstChild) ? range.getBoundingClientRect() : firstChild.getBoundingClientRect();
|
|
23296
|
+
var rteContent = this.parent.element.querySelector('.e-rte-content');
|
|
23297
|
+
var rteEle = this.parent.element;
|
|
23298
|
+
var toolbarHeight = rteEle.offsetHeight - rteContent.offsetHeight;
|
|
23299
|
+
var cursorTop = rect.top - this.parent.inputElement.getBoundingClientRect().top;
|
|
23300
|
+
var cursorLeft = rect.left - this.parent.inputElement.getBoundingClientRect().left;
|
|
23301
|
+
var screenHeight = window.innerHeight;
|
|
23302
|
+
var popupHeight = 330;
|
|
23303
|
+
var popupTop = cursorTop;
|
|
23304
|
+
var popupLeft = cursorLeft + rect.width;
|
|
23305
|
+
if (rteEle.getBoundingClientRect().top < 0) {
|
|
23306
|
+
popupTop = popupTop + rteContent.getBoundingClientRect().top - toolbarHeight;
|
|
23307
|
+
}
|
|
23308
|
+
if (rect.top < popupHeight) {
|
|
23309
|
+
// eslint-disable-next-line
|
|
23310
|
+
popupTop = popupTop;
|
|
23311
|
+
}
|
|
23312
|
+
else if (rect.top + popupHeight > screenHeight) {
|
|
23313
|
+
popupTop -= popupHeight + 20;
|
|
23314
|
+
}
|
|
23315
|
+
if (this.parent.inputElement) {
|
|
23316
|
+
coordinates = {
|
|
23317
|
+
top: popupTop + 60,
|
|
23318
|
+
left: popupLeft + 8
|
|
23319
|
+
};
|
|
23320
|
+
}
|
|
23321
|
+
return coordinates;
|
|
23322
|
+
};
|
|
23323
|
+
EmojiPicker.prototype.removeEventListener = function () {
|
|
23324
|
+
if (this.parent.isDestroyed) {
|
|
23325
|
+
return;
|
|
23326
|
+
}
|
|
23327
|
+
this.parent.off(emojiPicker, this.toolbarClick);
|
|
23328
|
+
this.parent.off(docClick, this.docClick);
|
|
23329
|
+
this.parent.off(keyDown, this.onkeyPress);
|
|
23330
|
+
this.parent.off(keyUp, this.onkeyUp);
|
|
23331
|
+
this.parent.off(contentscroll, this.contentscroll);
|
|
23332
|
+
this.parent.off(scroll, this.contentscroll);
|
|
23333
|
+
};
|
|
23334
|
+
/**
|
|
23335
|
+
* For internal use only - Get the module name.
|
|
23336
|
+
*
|
|
23337
|
+
* @returns {string} - returns the string value
|
|
23338
|
+
*/
|
|
23339
|
+
EmojiPicker.prototype.getModuleName = function () {
|
|
23340
|
+
return 'emojiPicker';
|
|
23341
|
+
};
|
|
23342
|
+
return EmojiPicker;
|
|
23343
|
+
}());
|
|
23344
|
+
|
|
21995
23345
|
/**
|
|
21996
23346
|
* Action export
|
|
21997
23347
|
*/
|
|
@@ -22772,15 +24122,20 @@ var Image = /** @__PURE__ @class */ (function () {
|
|
|
22772
24122
|
if (args.subCommand.toLowerCase() === 'undo' || args.subCommand.toLowerCase() === 'redo') {
|
|
22773
24123
|
for (var i = 0; i < this.parent.formatter.getUndoRedoStack().length; i++) {
|
|
22774
24124
|
var temp = this.parent.createElement('div');
|
|
22775
|
-
var contentElem =
|
|
22776
|
-
temp.appendChild(contentElem);
|
|
24125
|
+
var contentElem = this.parent.formatter.getUndoRedoStack()[i].text;
|
|
24126
|
+
temp.appendChild(contentElem.cloneNode(true));
|
|
22777
24127
|
var img = temp.querySelectorAll('img');
|
|
22778
24128
|
if (temp.querySelector('.e-img-resize') && img.length > 0) {
|
|
22779
24129
|
for (var j = 0; j < img.length; j++) {
|
|
22780
24130
|
img[j].style.outline = '';
|
|
22781
24131
|
}
|
|
22782
24132
|
detach(temp.querySelector('.e-img-resize'));
|
|
22783
|
-
|
|
24133
|
+
var clonedElement = temp.cloneNode(true);
|
|
24134
|
+
var fragment = document.createDocumentFragment();
|
|
24135
|
+
while (clonedElement.firstChild) {
|
|
24136
|
+
fragment.appendChild(clonedElement.firstChild);
|
|
24137
|
+
}
|
|
24138
|
+
this.parent.formatter.getUndoRedoStack()[i].text = fragment;
|
|
22784
24139
|
}
|
|
22785
24140
|
}
|
|
22786
24141
|
}
|
|
@@ -22973,7 +24328,7 @@ var Image = /** @__PURE__ @class */ (function () {
|
|
|
22973
24328
|
if (isNullOrUndefined(img.width)) {
|
|
22974
24329
|
return;
|
|
22975
24330
|
}
|
|
22976
|
-
// eslint-disable-next-line
|
|
24331
|
+
// eslint-disable-next-line security/detect-unsafe-regex
|
|
22977
24332
|
var width = img.style.width !== '' ? img.style.width.match(/^\d+(\.\d*)?%$/g) ? parseFloat(img.style.width) :
|
|
22978
24333
|
parseInt(img.style.width, 10) : img.width;
|
|
22979
24334
|
var height = img.style.height !== '' ? parseInt(img.style.height, 10) : img.height;
|
|
@@ -23252,7 +24607,7 @@ var Image = /** @__PURE__ @class */ (function () {
|
|
|
23252
24607
|
selectNodeEle = this.parent.formatter.editorManager.nodeSelection.getNodeCollection(range);
|
|
23253
24608
|
selectParentEle = this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range);
|
|
23254
24609
|
if (!originalEvent.ctrlKey && originalEvent.key && (originalEvent.key.length === 1 || originalEvent.action === 'enter') &&
|
|
23255
|
-
(selectParentEle[0].tagName === 'IMG') && selectParentEle[0].parentElement) {
|
|
24610
|
+
(!isNullOrUndefined(selectParentEle[0]) && selectParentEle[0].tagName === 'IMG') && selectParentEle[0].parentElement) {
|
|
23256
24611
|
var prev = selectParentEle[0].parentElement.childNodes[0];
|
|
23257
24612
|
if (this.contentModule.getEditPanel().querySelector('.e-img-resize')) {
|
|
23258
24613
|
this.removeResizeEle();
|
|
@@ -23901,7 +25256,7 @@ var Image = /** @__PURE__ @class */ (function () {
|
|
|
23901
25256
|
var dialogContent = this.imgsizeInput(e);
|
|
23902
25257
|
var selectObj_1 = { args: e.args, selfImage: this, selection: e.selection, selectNode: e.selectNode };
|
|
23903
25258
|
this.dialogObj.setProperties({
|
|
23904
|
-
height: 'inherit', width: '290px', header: imgSizeHeader, content: dialogContent, position: { X: 'center', Y: 'center' },
|
|
25259
|
+
height: (Browser.isDevice) ? '300px' : 'inherit', width: '290px', header: imgSizeHeader, content: dialogContent, position: { X: 'center', Y: 'center' },
|
|
23905
25260
|
buttons: [{
|
|
23906
25261
|
// eslint-disable-next-line
|
|
23907
25262
|
click: function (e) {
|
|
@@ -25047,8 +26402,8 @@ var Audio = /** @__PURE__ @class */ (function () {
|
|
|
25047
26402
|
if (args.subCommand.toLowerCase() === 'undo' || args.subCommand.toLowerCase() === 'redo') {
|
|
25048
26403
|
for (var i = 0; i < this.parent.formatter.getUndoRedoStack().length; i++) {
|
|
25049
26404
|
var temp = this.parent.createElement('div');
|
|
25050
|
-
var contentElem =
|
|
25051
|
-
temp.appendChild(contentElem);
|
|
26405
|
+
var contentElem = this.parent.formatter.getUndoRedoStack()[i].text;
|
|
26406
|
+
temp.appendChild(contentElem.cloneNode(true));
|
|
25052
26407
|
}
|
|
25053
26408
|
}
|
|
25054
26409
|
};
|
|
@@ -25934,15 +27289,20 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
25934
27289
|
if (args.subCommand.toLowerCase() === 'undo' || args.subCommand.toLowerCase() === 'redo') {
|
|
25935
27290
|
for (var i = 0; i < this.parent.formatter.getUndoRedoStack().length; i++) {
|
|
25936
27291
|
var temp = this.parent.createElement('div');
|
|
25937
|
-
var contentElem =
|
|
25938
|
-
temp.appendChild(contentElem);
|
|
27292
|
+
var contentElem = this.parent.formatter.getUndoRedoStack()[i].text;
|
|
27293
|
+
temp.appendChild(contentElem.cloneNode(true));
|
|
25939
27294
|
var vid = temp.querySelectorAll('video');
|
|
25940
27295
|
if (temp.querySelector('.e-vid-resize') && vid.length > 0) {
|
|
25941
27296
|
for (var j = 0; j < vid.length; j++) {
|
|
25942
27297
|
vid[j].style.outline = '';
|
|
25943
27298
|
}
|
|
25944
27299
|
detach(temp.querySelector('.e-vid-resize'));
|
|
25945
|
-
|
|
27300
|
+
var clonedElement = temp.cloneNode(true);
|
|
27301
|
+
var fragment = document.createDocumentFragment();
|
|
27302
|
+
while (clonedElement.firstChild) {
|
|
27303
|
+
fragment.appendChild(clonedElement.firstChild);
|
|
27304
|
+
}
|
|
27305
|
+
this.parent.formatter.getUndoRedoStack()[i].text = fragment;
|
|
25946
27306
|
}
|
|
25947
27307
|
}
|
|
25948
27308
|
}
|
|
@@ -26238,8 +27598,8 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
26238
27598
|
parseInt(vidEleStyle.width, 10) : vid.style.width !== '' ? vid.style.width : vid.width;
|
|
26239
27599
|
var height = vidEleStyle.height !== '' ? parseInt(vidEleStyle.height, 10) : vid.style.height !== '' ? vid.style.height : vid.height;
|
|
26240
27600
|
if (width > height) {
|
|
26241
|
-
vid.style.minWidth = this.parent.insertVideoSettings.minWidth === 0 ? '
|
|
26242
|
-
vid.style.minHeight = this.parent.insertVideoSettings.minHeight === 0 ? '
|
|
27601
|
+
vid.style.minWidth = this.parent.insertVideoSettings.minWidth === 0 ? '200px' : formatUnit(this.parent.insertVideoSettings.minWidth);
|
|
27602
|
+
vid.style.minHeight = this.parent.insertVideoSettings.minHeight === 0 ? '90px' : formatUnit(this.parent.insertVideoSettings.minHeight);
|
|
26243
27603
|
if (this.parent.insertVideoSettings.resizeByPercent) {
|
|
26244
27604
|
if (parseInt('' + vid.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
|
|
26245
27605
|
var percentageValue = this.pixToPerc((parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY), (vid.previousElementSibling || vid.parentElement));
|
|
@@ -26435,7 +27795,7 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
26435
27795
|
selectNodeEle = this.parent.formatter.editorManager.nodeSelection.getNodeCollection(range);
|
|
26436
27796
|
selectParentEle = this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range);
|
|
26437
27797
|
if (!originalEvent.ctrlKey && originalEvent.key && (originalEvent.key.length === 1 || originalEvent.action === 'enter') &&
|
|
26438
|
-
((selectParentEle[0].tagName === 'VIDEO' || this.isEmbedVidElem(selectParentEle[0]))) &&
|
|
27798
|
+
((!isNullOrUndefined(selectParentEle[0]) && selectParentEle[0].tagName === 'VIDEO' || this.isEmbedVidElem(selectParentEle[0]))) &&
|
|
26439
27799
|
selectParentEle[0].parentElement) {
|
|
26440
27800
|
var prev = selectParentEle[0].parentElement.childNodes[0];
|
|
26441
27801
|
if (this.contentModule.getEditPanel().querySelector('.e-vid-resize')) {
|
|
@@ -26951,7 +28311,7 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
26951
28311
|
videoUrl.appendChild(urlContent);
|
|
26952
28312
|
this.embedInputUrl = this.parent.createElement('textarea', {
|
|
26953
28313
|
className: 'e-input e-embed-video-url',
|
|
26954
|
-
attrs: { placeholder: '
|
|
28314
|
+
attrs: { placeholder: this.i10n.getConstant('pasteEmbeddedCodeHere'), type: 'text', tabindex: '-1', 'aria-label': this.i10n.getConstant('embedVideoLinkHeader') }
|
|
26955
28315
|
});
|
|
26956
28316
|
this.embedInputUrl.addEventListener('keyup', function () {
|
|
26957
28317
|
if (!isNullOrUndefined(_this.embedInputUrl)) {
|
|
@@ -26978,7 +28338,7 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
26978
28338
|
}
|
|
26979
28339
|
});
|
|
26980
28340
|
var embedUrlBtn = new RadioButton({
|
|
26981
|
-
label: '
|
|
28341
|
+
label: this.i10n.getConstant('embeddedCode'),
|
|
26982
28342
|
checked: true,
|
|
26983
28343
|
name: 'URL',
|
|
26984
28344
|
created: function () {
|
|
@@ -26992,7 +28352,7 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
26992
28352
|
});
|
|
26993
28353
|
embedUrlBtn.appendTo(videoUrl.querySelector('#embedURL'));
|
|
26994
28354
|
var webUrlBtn = new RadioButton({
|
|
26995
|
-
label: '
|
|
28355
|
+
label: this.i10n.getConstant('webUrl'),
|
|
26996
28356
|
name: 'URL',
|
|
26997
28357
|
change: function () {
|
|
26998
28358
|
urlContent.innerHTML = '';
|
|
@@ -29425,6 +30785,9 @@ var FileManagerSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
29425
30785
|
function FileManagerSettings() {
|
|
29426
30786
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
29427
30787
|
}
|
|
30788
|
+
__decorate$2([
|
|
30789
|
+
Event()
|
|
30790
|
+
], FileManagerSettings.prototype, "beforeSend", void 0);
|
|
29428
30791
|
__decorate$2([
|
|
29429
30792
|
Complex({ getImageUrl: null, url: null, uploadUrl: null }, AjaxSettings)
|
|
29430
30793
|
], FileManagerSettings.prototype, "ajaxSettings", void 0);
|
|
@@ -29546,16 +30909,29 @@ var FormatPainterSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
29546
30909
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
29547
30910
|
}
|
|
29548
30911
|
__decorate$2([
|
|
29549
|
-
Property(
|
|
29550
|
-
], FormatPainterSettings.prototype, "allowedContext", void 0);
|
|
29551
|
-
__decorate$2([
|
|
29552
|
-
Property('b; em; font; sub; sup; kbd; i; s; u; code; strong; span; p; div; h1; h2; h3; h4; h5; h6; blockquote; table; thead; tbody; tr; td; th; ol; ul; li; pre;')
|
|
30912
|
+
Property('b; em; font; sub; sup; kbd; i; s; u; code; strong; span; p; div; h1; h2; h3; h4; h5; h6; blockquote; ol; ul; li; pre;')
|
|
29553
30913
|
], FormatPainterSettings.prototype, "allowedFormats", void 0);
|
|
29554
30914
|
__decorate$2([
|
|
29555
30915
|
Property(null)
|
|
29556
30916
|
], FormatPainterSettings.prototype, "deniedFormats", void 0);
|
|
29557
30917
|
return FormatPainterSettings;
|
|
29558
30918
|
}(ChildProperty));
|
|
30919
|
+
/**
|
|
30920
|
+
* Specifies the emoji picker options in Rich Text Editor with the following properties.
|
|
30921
|
+
*/
|
|
30922
|
+
var EmojiSettings = /** @__PURE__ @class */ (function (_super) {
|
|
30923
|
+
__extends$5(EmojiSettings, _super);
|
|
30924
|
+
function EmojiSettings() {
|
|
30925
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30926
|
+
}
|
|
30927
|
+
__decorate$2([
|
|
30928
|
+
Property(defaultEmojiIcons)
|
|
30929
|
+
], EmojiSettings.prototype, "iconsSet", void 0);
|
|
30930
|
+
__decorate$2([
|
|
30931
|
+
Property(true)
|
|
30932
|
+
], EmojiSettings.prototype, "showSearchBox", void 0);
|
|
30933
|
+
return EmojiSettings;
|
|
30934
|
+
}(ChildProperty));
|
|
29559
30935
|
/**
|
|
29560
30936
|
* Configures the Paste Cleanup settings of the RichTextEditor.
|
|
29561
30937
|
*/
|
|
@@ -29855,7 +31231,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
29855
31231
|
}
|
|
29856
31232
|
isTableEnter = blockElement.tagName === 'TD' || blockElement.tagName === 'TBODY' ? false : true;
|
|
29857
31233
|
}
|
|
29858
|
-
if (e.args.which === 13 && e.args.code === 'Enter') {
|
|
31234
|
+
if (e.args.which === 13 && (!Browser.isDevice ? e.args.code === 'Enter' : e.args.key === 'Enter')) {
|
|
29859
31235
|
if (isNullOrUndefined(this.startNode.closest('LI, UL, OL')) && isNullOrUndefined(this.endNode.closest('LI, UL, OL')) && isTableEnter &&
|
|
29860
31236
|
isNullOrUndefined(this.startNode.closest('PRE')) && isNullOrUndefined(this.endNode.closest('PRE'))) {
|
|
29861
31237
|
var shiftKey_1 = e.args.shiftKey;
|
|
@@ -29961,7 +31337,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
29961
31337
|
var isFocusedFirst = false;
|
|
29962
31338
|
if (_this.range.startOffset !== 0 && _this.range.endOffset !== 0 &&
|
|
29963
31339
|
_this.range.startContainer === _this.range.endContainer && !(!isNullOrUndefined(nearBlockNode.childNodes[0])
|
|
29964
|
-
&& nearBlockNode.childNodes[0].nodeName === 'IMG'
|
|
31340
|
+
&& (nearBlockNode.childNodes[0].nodeName === 'IMG' || nearBlockNode.querySelectorAll('img, audio, video').length > 0))) {
|
|
29965
31341
|
var startNodeText = _this.range.startContainer.textContent;
|
|
29966
31342
|
var splitFirstText = startNodeText.substring(0, _this.range.startOffset);
|
|
29967
31343
|
// eslint-disable-next-line max-len
|
|
@@ -30383,6 +31759,10 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
30383
31759
|
member: 'formatPainter',
|
|
30384
31760
|
args: [this]
|
|
30385
31761
|
});
|
|
31762
|
+
modules.push({
|
|
31763
|
+
member: 'emojiPicker',
|
|
31764
|
+
args: [this, this.serviceLocator]
|
|
31765
|
+
});
|
|
30386
31766
|
}
|
|
30387
31767
|
if (this.fileManagerSettings.enable) {
|
|
30388
31768
|
modules.push({ member: 'fileManager', args: [this, this.serviceLocator] });
|
|
@@ -30582,6 +31962,20 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
30582
31962
|
});
|
|
30583
31963
|
return str;
|
|
30584
31964
|
};
|
|
31965
|
+
/**
|
|
31966
|
+
* Shows the emoji picker
|
|
31967
|
+
*
|
|
31968
|
+
* @param {number} x - specifies the number value.
|
|
31969
|
+
* @param {number} y - specifies the number value.
|
|
31970
|
+
* @returns {void}
|
|
31971
|
+
* @public
|
|
31972
|
+
*/
|
|
31973
|
+
RichTextEditor.prototype.showEmojiPicker = function (x, y) {
|
|
31974
|
+
if (this.readonly) {
|
|
31975
|
+
return;
|
|
31976
|
+
}
|
|
31977
|
+
this.notify(emojiPicker, { x: x, y: y });
|
|
31978
|
+
};
|
|
30585
31979
|
/**
|
|
30586
31980
|
* Executes the commands
|
|
30587
31981
|
*
|
|
@@ -30817,7 +32211,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
30817
32211
|
this.valueContainer.defaultValue = this.value;
|
|
30818
32212
|
}
|
|
30819
32213
|
// eslint-disable-next-line
|
|
30820
|
-
(!this.
|
|
32214
|
+
(this.enabled && !this.readonly) ? this.eventInitializer() : this.unWireEvents();
|
|
30821
32215
|
this.notify(bindCssClass, { cssClass: this.cssClass });
|
|
30822
32216
|
this.addAudioVideoWrapper();
|
|
30823
32217
|
this.notify(tableclass, {});
|
|
@@ -30903,6 +32297,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
30903
32297
|
var currentEndContainer = range.endContainer;
|
|
30904
32298
|
var currentStartOffset = range.startOffset;
|
|
30905
32299
|
var isSameContainer = currentStartContainer === currentEndContainer ? true : false;
|
|
32300
|
+
// eslint-disable-next-line
|
|
30906
32301
|
var currentEndOffset = currentEndContainer.textContent.length;
|
|
30907
32302
|
var endNode = range.endContainer.nodeName === '#text' ? range.endContainer.parentElement :
|
|
30908
32303
|
range.endContainer;
|
|
@@ -30985,7 +32380,8 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
30985
32380
|
this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(), range.startContainer, range.startOffset);
|
|
30986
32381
|
}
|
|
30987
32382
|
}
|
|
30988
|
-
|
|
32383
|
+
var notFormatPainterCopy = !isNullOrUndefined(e.action) && e.action !== 'format-copy';
|
|
32384
|
+
if (this.formatter.getUndoRedoStack().length === 0 && notFormatPainterCopy) {
|
|
30989
32385
|
this.formatter.saveData();
|
|
30990
32386
|
}
|
|
30991
32387
|
if (e.action !== 'insert-link' &&
|
|
@@ -31017,8 +32413,8 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
31017
32413
|
if ((!isNullOrUndefined(this.placeHolderWrapper)) && (this.inputElement.textContent.length !== 1)) {
|
|
31018
32414
|
this.placeHolderWrapper.style.display = 'none';
|
|
31019
32415
|
}
|
|
31020
|
-
else if (this.iframeSettings.enable && this.inputElement.classList.contains(
|
|
31021
|
-
removeClass([this.inputElement],
|
|
32416
|
+
else if (this.iframeSettings.enable && this.inputElement.classList.contains('e-rte-placeholder')) {
|
|
32417
|
+
removeClass([this.inputElement], 'e-rte-placeholder');
|
|
31022
32418
|
}
|
|
31023
32419
|
else {
|
|
31024
32420
|
this.setPlaceHolder();
|
|
@@ -31047,7 +32443,9 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
31047
32443
|
this.inputElement.innerHTML = getEditValue(getDefaultValue(this), this);
|
|
31048
32444
|
}
|
|
31049
32445
|
var allowedKeys = e.which === 32 || e.which === 13 || e.which === 8 || e.which === 46;
|
|
31050
|
-
|
|
32446
|
+
var formatPainterCopy = e.key === 'C' && e.altKey && e.shiftKey;
|
|
32447
|
+
var formatPainterPaste = e.key === 'V' && e.altKey && e.shiftKey;
|
|
32448
|
+
if ((!formatPainterCopy && !formatPainterPaste) && ((e.key !== 'shift' && !e.ctrlKey) && e.key && e.key.length === 1 || allowedKeys) || (this.editorMode === 'Markdown'
|
|
31051
32449
|
&& ((e.key !== 'shift' && !e.ctrlKey) && e.key && e.key.length === 1 || allowedKeys)) && !this.inlineMode.enable) {
|
|
31052
32450
|
this.formatter.onKeyHandler(this, e);
|
|
31053
32451
|
}
|
|
@@ -31598,6 +32996,9 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
31598
32996
|
newProp.quickToolbarSettings.showOnRightClick ? this.wireContextEvent() : this.unWireContextEvent();
|
|
31599
32997
|
this.notify(modelChanged, { newProp: newProp, oldProp: oldProp });
|
|
31600
32998
|
break;
|
|
32999
|
+
case 'formatPainterSettings':
|
|
33000
|
+
this.formatter.editorManager.observer.notify(MODEL_CHANGED, { module: 'formatPainter', newProp: newProp });
|
|
33001
|
+
break;
|
|
31601
33002
|
default:
|
|
31602
33003
|
this.notify(modelChanged, { newProp: newProp, oldProp: oldProp });
|
|
31603
33004
|
break;
|
|
@@ -31727,11 +33128,11 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
31727
33128
|
if (this.inputElement.textContent.length === 0 && this.inputElement.childNodes.length < 2 && !isNullOrUndefined(this.inputElement.firstChild) && (this.inputElement.firstChild.nodeName === 'BR' ||
|
|
31728
33129
|
((this.inputElement.firstChild.nodeName === 'P' || this.inputElement.firstChild.nodeName === 'DIV') && !isNullOrUndefined(this.inputElement.firstChild.firstChild) &&
|
|
31729
33130
|
this.inputElement.firstChild.firstChild.nodeName === 'BR'))) {
|
|
31730
|
-
addClass([this.inputElement],
|
|
33131
|
+
addClass([this.inputElement], 'e-rte-placeholder');
|
|
31731
33132
|
this.inputElement.setAttribute('placeholder', this.placeholder);
|
|
31732
33133
|
}
|
|
31733
33134
|
else {
|
|
31734
|
-
removeClass([this.inputElement],
|
|
33135
|
+
removeClass([this.inputElement], 'e-rte-placeholder');
|
|
31735
33136
|
}
|
|
31736
33137
|
}
|
|
31737
33138
|
};
|
|
@@ -31961,7 +33362,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
31961
33362
|
var _this = this;
|
|
31962
33363
|
if (this.valueTemplate) {
|
|
31963
33364
|
var regEx = new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);
|
|
31964
|
-
if (regEx.test(this.valueTemplate)) {
|
|
33365
|
+
if (typeof this.valueTemplate === 'string' && regEx.test(this.valueTemplate)) {
|
|
31965
33366
|
this.setProperties({ value: this.valueTemplate });
|
|
31966
33367
|
}
|
|
31967
33368
|
else {
|
|
@@ -32460,7 +33861,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
32460
33861
|
this.timeInterval = null;
|
|
32461
33862
|
}
|
|
32462
33863
|
if (!isNullOrUndefined(this.placeHolderWrapper) && this.element.querySelector('[title = Preview]')) {
|
|
32463
|
-
this.placeHolderWrapper.style.display =
|
|
33864
|
+
this.placeHolderWrapper.style.display = 'none';
|
|
32464
33865
|
}
|
|
32465
33866
|
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
32466
33867
|
}
|
|
@@ -32519,7 +33920,8 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
32519
33920
|
EventHandler.add(element, 'scroll', this.scrollHandler, this);
|
|
32520
33921
|
}
|
|
32521
33922
|
if (!this.iframeSettings.enable) {
|
|
32522
|
-
|
|
33923
|
+
// Add the scroll event handler from the inputElement
|
|
33924
|
+
EventHandler.add(this.inputElement, 'scroll', this.contentScrollHandler, this);
|
|
32523
33925
|
}
|
|
32524
33926
|
};
|
|
32525
33927
|
RichTextEditor.prototype.wireContextEvent = function () {
|
|
@@ -32548,7 +33950,8 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
32548
33950
|
EventHandler.remove(element, 'scroll', this.scrollHandler);
|
|
32549
33951
|
}
|
|
32550
33952
|
if (!this.iframeSettings.enable) {
|
|
32551
|
-
|
|
33953
|
+
// Remove the scroll event handler from the inputElement
|
|
33954
|
+
EventHandler.remove(this.inputElement, 'scroll', this.contentScrollHandler);
|
|
32552
33955
|
}
|
|
32553
33956
|
};
|
|
32554
33957
|
RichTextEditor.prototype.touchHandler = function (e) {
|
|
@@ -32731,6 +34134,9 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
32731
34134
|
__decorate$1([
|
|
32732
34135
|
Complex({}, FormatPainterSettings)
|
|
32733
34136
|
], RichTextEditor.prototype, "formatPainterSettings", void 0);
|
|
34137
|
+
__decorate$1([
|
|
34138
|
+
Complex({}, EmojiSettings)
|
|
34139
|
+
], RichTextEditor.prototype, "emojiPickerSettings", void 0);
|
|
32734
34140
|
__decorate$1([
|
|
32735
34141
|
Complex({}, IFrameSettings)
|
|
32736
34142
|
], RichTextEditor.prototype, "iframeSettings", void 0);
|
|
@@ -33020,5 +34426,5 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
33020
34426
|
* Rich Text Editor component exported items
|
|
33021
34427
|
*/
|
|
33022
34428
|
|
|
33023
|
-
export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, blockEmptyNodes, inlineEmptyNodes, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_TB_ABS_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_AUDIOBREAK, CLS_CLICKELEM, CLS_VID_CLICK_ELEM, CLS_AUDIOWRAP, CLS_VIDEOWRAP, CLS_VIDEOBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_AUDIOINLINE, CLS_VIDEOINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_LIST_PRIMARY_CONTENT, CLS_NUMBERFORMATLIST_TB_BTN, CLS_BULLETFORMATLIST_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_ALIGN_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_AUD_FOCUS, CLS_VID_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_TB_ENABLED, CLS_RTE_RES_WEST, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, getDefaultValue, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, getLocaleFontFormat, updateDropDownFontFormatLocale, ServiceLocator, RendererFactory, EditorManager, IMAGE, AUDIO, VIDEO, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, TABLE_MERGE, TABLE_VERTICAL_SPLIT, TABLE_HORIZONTAL_SPLIT, TABLE_MOVE, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, SELF_CLOSING_TAGS, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_VIDEO_RIGHT, CLASS_VIDEO_LEFT, CLASS_VIDEO_CENTER, CLASS_IMAGE_BREAK, CLASS_AUDIO_BREAK, CLASS_VIDEO_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, CLASS_AUDIO_INLINE, CLASS_CLICK_ELEM, CLASS_VIDEO_CLICK_ELEM, CLASS_AUDIO, CLASS_VIDEO, CLASS_AUDIO_WRAP, CLASS_VIDEO_WRAP, CLASS_EMBED_VIDEO_WRAP, CLASS_AUDIO_FOCUS, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, AudioCommand, VideoCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, FormatPainterActions, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP, ON_BEGIN, SPACE_ACTION, FORMAT_PAINTER_ACTIONS };
|
|
34429
|
+
export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker, maximizeMinimizeClick, blockEmptyNodes, inlineEmptyNodes, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_TB_ABS_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_AUDIOBREAK, CLS_CLICKELEM, CLS_VID_CLICK_ELEM, CLS_AUDIOWRAP, CLS_VIDEOWRAP, CLS_VIDEOBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_AUDIOINLINE, CLS_VIDEOINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_LIST_PRIMARY_CONTENT, CLS_NUMBERFORMATLIST_TB_BTN, CLS_BULLETFORMATLIST_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_ALIGN_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_AUD_FOCUS, CLS_VID_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_TB_ENABLED, CLS_RTE_RES_WEST, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, getDefaultValue, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, getLocaleFontFormat, updateDropDownFontFormatLocale, ServiceLocator, RendererFactory, EditorManager, IMAGE, AUDIO, VIDEO, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, TABLE_MERGE, TABLE_VERTICAL_SPLIT, TABLE_HORIZONTAL_SPLIT, TABLE_MOVE, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, SELF_CLOSING_TAGS, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_VIDEO_RIGHT, CLASS_VIDEO_LEFT, CLASS_VIDEO_CENTER, CLASS_IMAGE_BREAK, CLASS_AUDIO_BREAK, CLASS_VIDEO_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, CLASS_AUDIO_INLINE, CLASS_CLICK_ELEM, CLASS_VIDEO_CLICK_ELEM, CLASS_AUDIO, CLASS_VIDEO, CLASS_AUDIO_WRAP, CLASS_VIDEO_WRAP, CLASS_EMBED_VIDEO_WRAP, CLASS_AUDIO_FOCUS, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, AudioCommand, VideoCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, FormatPainterActions, EmojiPickerAction, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP, ON_BEGIN, SPACE_ACTION, FORMAT_PAINTER_ACTIONS, EMOJI_PICKER_ACTIONS };
|
|
33024
34430
|
//# sourceMappingURL=ej2-richtexteditor.es5.js.map
|