jodit 3.21.3 → 3.21.4

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.
Files changed (37) hide show
  1. package/build/jodit.css +2 -2
  2. package/build/jodit.es2018.css +1 -1
  3. package/build/jodit.es2018.en.css +1 -1
  4. package/build/jodit.es2018.en.js +33 -12
  5. package/build/jodit.es2018.en.min.js +1 -1
  6. package/build/jodit.es2018.js +51 -30
  7. package/build/jodit.es2018.min.js +1 -1
  8. package/build/jodit.js +28 -11
  9. package/build/jodit.min.css +1 -1
  10. package/build/jodit.min.js +1 -1
  11. package/build/plugins/debug/debug.es2018.en.js +1 -1
  12. package/build/plugins/debug/debug.es2018.js +1 -1
  13. package/build/plugins/debug/debug.js +1 -1
  14. package/build/plugins/speech-recognize/speech-recognize.css +1 -1
  15. package/build/plugins/speech-recognize/speech-recognize.es2018.css +1 -1
  16. package/build/plugins/speech-recognize/speech-recognize.es2018.en.css +1 -1
  17. package/build/plugins/speech-recognize/speech-recognize.es2018.en.js +1 -1
  18. package/build/plugins/speech-recognize/speech-recognize.es2018.js +1 -1
  19. package/build/plugins/speech-recognize/speech-recognize.js +1 -1
  20. package/build/vdom.css +1 -1
  21. package/build/vdom.js +1 -1
  22. package/index.html +2 -2
  23. package/package.json +10 -10
  24. package/src/core/create/create.ts +1 -0
  25. package/src/core/helpers/size/position.ts +6 -1
  26. package/src/core/helpers/utils/selector.ts +4 -4
  27. package/src/core/selection/style/api/get-suit-parent.ts +5 -0
  28. package/src/core/selection/style/api/is-normal-node.ts +7 -1
  29. package/src/core/selection/style/api/toggle-commit-styles.ts +9 -2
  30. package/src/core/selection/style/apply-style.ts +1 -1
  31. package/src/core/selection/style/style.test.js +7 -0
  32. package/src/modules/widget/tabs/tabs.ts +5 -3
  33. package/src/plugins/search/search.test.screenshot.js +4 -1
  34. package/src/styles/themes/theme.test.screenshot.js +4 -1
  35. package/types/core/helpers/utils/selector.d.ts +1 -1
  36. package/types/core/selection/style/api/toggle-commit-styles.d.ts +2 -1
  37. package/types/modules/widget/tabs/tabs.d.ts +1 -1
package/build/jodit.css CHANGED
@@ -1,14 +1,14 @@
1
1
  /*!
2
2
  * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
4
- * Version: v3.21.3
4
+ * Version: v3.21.4
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
8
  /*!
9
9
  * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
10
10
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
11
- * Version: v3.21.3
11
+ * Version: v3.21.4
12
12
  * Url: https://xdsoft.net/jodit/
13
13
  * License(s): MIT
14
14
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
4
- * Version: v3.21.3
4
+ * Version: v3.21.4
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
4
- * Version: v3.21.3
4
+ * Version: v3.21.4
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
4
- * Version: v3.21.3
4
+ * Version: v3.21.4
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -22,7 +22,7 @@ return /******/ (function() { // webpackBootstrap
22
22
  /***/ 11399:
23
23
  /***/ (function(module) {
24
24
 
25
- module.exports["default"] = ["Type something","About Jodit","Jodit Editor","Jodit User's Guide","contains detailed help for using","For information about the license, please go to our website:","Buy full version","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.","Anchor","Open in new tab","Open in fullsize","Clear Formatting","Fill color or set the text color","Redo","Undo","Bold","Italic","Insert Unordered List","Insert Ordered List","Align Center","Align Justify","Align Left","Align Right","Insert Horizontal Line","Insert Image","Insert file","Insert youtube/vimeo video","Insert link","Font size","Font family","Insert format block","Normal","Heading 1","Heading 2","Heading 3","Heading 4","Quote","Code","Insert","Insert table","Decrease Indent","Increase Indent","Select Special Character","Insert Special Character","Paint format","Change mode","Margins","top","right","bottom","left","Styles","Classes","Align","Right","Center","Left","--Not Set--","Src","Title","Alternative","Link","Open link in new tab","Image","file","Advanced","Image properties","Cancel","Ok","File Browser","Error on load list","Error on load folders","Are you sure?","Enter Directory name","Create directory","type name","Drop image","Drop file","or click","Alternative text","Upload","Browse","Background","Text","Top","Middle","Bottom","Insert column before","Insert column after","Insert row above","Insert row below","Delete table","Delete row","Delete column","Empty cell","Chars: %d","Words: %d","Strike through","Underline","superscript","subscript","Cut selection","Select all","Break","Search for","Replace with","Replace","Paste","Choose Content to Paste","source","bold","italic","brush","link","undo","redo","table","image","eraser","paragraph","fontsize","video","font","about","print","underline","strikethrough","indent","outdent","fullsize","shrink","hr","ul","ol","cut","selectall","Embed code","Open link","Edit link","No follow","Unlink","Update","pencil","Eye"," URL","Edit","Horizontal align","Filter","Sort by changed","Sort by name","Sort by size","Add folder","Reset","Save","Save as ...","Resize","Crop","Width","Height","Keep Aspect Ratio","Yes","No","Remove","Select","Select %s","Vertical align","Split","Merge","Add column","Add row","License: %s","Delete","Split vertical","Split horizontal","Border","Your code is similar to HTML. Keep as HTML?","Paste as HTML","Keep","Insert as Text","Insert only Text","You can only edit your own images. Download this image on the host?","The image has been successfully uploaded to the host!","palette","There are no files","Rename","Enter new name","preview","download","Paste from clipboard","Your browser doesn't support direct access to the clipboard.","Copy selection","copy","Border radius","Show all","Apply","Please fill out this field","Please enter a web address","Default","Circle","Dot","Quadrate","Find","Find Previous","Find Next","The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","Word Paste Detected","Clean","Insert className","Press Alt for custom resizing"]
25
+ module.exports["default"] = ["Type something","About Jodit","Jodit Editor","Free Non-commercial Version","Jodit User's Guide","contains detailed help for using","For information about the license, please go to our website:","Buy full version","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.","Anchor","Open in new tab","Open in fullsize","Clear Formatting","Fill color or set the text color","Redo","Undo","Bold","Italic","Insert Unordered List","Insert Ordered List","Align Center","Align Justify","Align Left","Align Right","Insert Horizontal Line","Insert Image","Insert file","Insert youtube/vimeo video","Insert link","Font size","Font family","Insert format block","Normal","Heading 1","Heading 2","Heading 3","Heading 4","Quote","Code","Insert","Insert table","Decrease Indent","Increase Indent","Select Special Character","Insert Special Character","Paint format","Change mode","Margins","top","right","bottom","left","Styles","Classes","Align","Right","Center","Left","--Not Set--","Src","Title","Alternative","Link","Open link in new tab","Image","file","Advanced","Image properties","Cancel","Ok","Your code is similar to HTML. Keep as HTML?","Paste as HTML","Keep","Clean","Insert as Text","Insert only Text","Word Paste Detected","The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","File Browser","Error on load list","Error on load folders","Are you sure?","Enter Directory name","Create directory","type name","Drop image","Drop file","or click","Alternative text","Browse","Upload","Background","Text","Top","Middle","Bottom","Insert column before","Insert column after","Insert row above","Insert row below","Delete table","Delete row","Delete column","Empty cell","source","bold","italic","brush","link","undo","redo","table","image","eraser","paragraph","fontsize","video","font","about","print","underline","strikethrough","indent","outdent","fullsize","shrink","hr","ul","ol","cut","selectall","Embed code","Open link","Edit link","No follow","Unlink","Eye","pencil","Update"," URL","Edit","Horizontal align","Filter","Sort by changed","Sort by name","Sort by size","Add folder","Reset","Save","Save as ...","Resize","Crop","Width","Height","Keep Aspect Ratio","Yes","No","Remove","Select","Chars: %d","Words: %d","All","Select %s","Select all","Vertical align","Split","Split vertical","Split horizontal","Merge","Add column","Add row","Delete","Border","License: %s","Strike through","Underline","superscript","subscript","Cut selection","Break","Search for","Replace with","Replace","Paste","Choose Content to Paste","You can only edit your own images. Download this image on the host?","The image has been successfully uploaded to the host!","palette","There are no files","Rename","Enter new name","preview","download","Paste from clipboard","Your browser doesn't support direct access to the clipboard.","Copy selection","copy","Border radius","Show all","Apply","Please fill out this field","Please enter a web address","Default","Circle","Dot","Quadrate","Find","Find Previous","Find Next","Insert className","Press Alt for custom resizing"]
26
26
 
27
27
  /***/ }),
28
28
 
@@ -5422,7 +5422,10 @@ var is_jodit_object = __webpack_require__(12866);
5422
5422
  function position(elm, jodit, recurse = false) {
5423
5423
  const rect = elm.getBoundingClientRect();
5424
5424
  let xPos = rect.left, yPos = rect.top;
5425
- if ((0,is_jodit_object/* isJoditObject */.Z)(jodit) && jodit.iframe && !recurse) {
5425
+ if ((0,is_jodit_object/* isJoditObject */.Z)(jodit) &&
5426
+ jodit.iframe &&
5427
+ jodit.ed.body.contains(elm) &&
5428
+ !recurse) {
5426
5429
  const { left, top } = position(jodit.iframe, jodit, true);
5427
5430
  xPos += left;
5428
5431
  yPos += top;
@@ -9189,8 +9192,12 @@ class FiniteStateMachine {
9189
9192
  * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
9190
9193
  */
9191
9194
 
9195
+
9192
9196
  function isNormalNode(elm) {
9193
- return Boolean(elm && !dom/* Dom.isEmptyTextNode */.i.isEmptyTextNode(elm) && !dom/* Dom.isTemporary */.i.isTemporary(elm));
9197
+ return Boolean(elm &&
9198
+ !dom/* Dom.isEmptyTextNode */.i.isEmptyTextNode(elm) &&
9199
+ !dom/* Dom.isTemporary */.i.isTemporary(elm) &&
9200
+ !Select.isMarker(elm));
9194
9201
  }
9195
9202
 
9196
9203
  ;// CONCATENATED MODULE: ./src/core/selection/style/api/is-suit-element.ts
@@ -9272,6 +9279,9 @@ function getSuitParent(style, node, root) {
9272
9279
  (!dom/* Dom.isBlock */.i.isBlock(parentNode) || style.elementIsBlock)) {
9273
9280
  return parentNode;
9274
9281
  }
9282
+ if (style.isElementCommit && !dom/* Dom.isBlock */.i.isBlock(parentNode)) {
9283
+ return getSuitParent(style, parentNode, root);
9284
+ }
9275
9285
  return null;
9276
9286
  }
9277
9287
 
@@ -9293,10 +9303,15 @@ function isInsideInvisibleElement(font, root) {
9293
9303
  * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
9294
9304
  */
9295
9305
 
9296
- function toggleCommitStyles(commitStyle, elm) {
9306
+ function toggleCommitStyles(commitStyle, elm, jodit) {
9297
9307
  if (commitStyle.elementIsBlock ||
9298
9308
  (dom/* Dom.isTag */.i.isTag(elm, commitStyle.element) && !commitStyle.elementIsDefault)) {
9299
- dom/* Dom.unwrap */.i.unwrap(elm);
9309
+ if (elm.getAttribute('style')) {
9310
+ dom/* Dom.replace */.i.replace(elm, commitStyle.defaultTag, jodit.createInside, true);
9311
+ }
9312
+ else {
9313
+ dom/* Dom.unwrap */.i.unwrap(elm);
9314
+ }
9300
9315
  return true;
9301
9316
  }
9302
9317
  return false;
@@ -9566,7 +9581,7 @@ function ApplyStyle(jodit, cs) {
9566
9581
  wholeElement: {
9567
9582
  toggleStyles(toggleElm) {
9568
9583
  let mode = INITIAL;
9569
- if (toggleCommitStyles(cs, toggleElm)) {
9584
+ if (toggleCommitStyles(cs, toggleElm, jodit)) {
9570
9585
  mode = UNWRAP;
9571
9586
  }
9572
9587
  else {
@@ -12445,7 +12460,7 @@ let View = View_1 = class View extends jodit_modules__WEBPACK_IMPORTED_MODULE_3_
12445
12460
  this.parent = null;
12446
12461
  this.mods = {};
12447
12462
  this.components = new Set();
12448
- this.version = "3.21.3";
12463
+ this.version = "3.21.4";
12449
12464
  this.buffer = _storage__WEBPACK_IMPORTED_MODULE_0__/* .Storage.makeStorage */ .Ke.makeStorage();
12450
12465
  this.storage = _storage__WEBPACK_IMPORTED_MODULE_0__/* .Storage.makeStorage */ .Ke.makeStorage(true, this.componentName);
12451
12466
  this.OPTIONS = View_1.defaultOptions;
@@ -12527,10 +12542,10 @@ let View = View_1 = class View extends jodit_modules__WEBPACK_IMPORTED_MODULE_3_
12527
12542
  return this.__isFullSize;
12528
12543
  }
12529
12544
  getVersion() {
12530
- return "3.21.3";
12545
+ return "3.21.4";
12531
12546
  }
12532
12547
  static getVersion() {
12533
- return "3.21.3";
12548
+ return "3.21.4";
12534
12549
  }
12535
12550
  initOptions(options) {
12536
12551
  this.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.ConfigProto)(options || {}, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.ConfigProto)(this.options || {}, View_1.defaultOptions));
@@ -18343,8 +18358,12 @@ const ColorPickerWidget = (editor, callback, coldColor) => {
18343
18358
  return form;
18344
18359
  };
18345
18360
 
18361
+ // EXTERNAL MODULE: ./src/core/helpers/checker/is-function.ts
18362
+ var is_function = __webpack_require__(87385);
18346
18363
  // EXTERNAL MODULE: ./src/core/component/index.ts + 1 modules
18347
18364
  var component = __webpack_require__(2624);
18365
+ // EXTERNAL MODULE: ./src/core/dom/dom.ts
18366
+ var dom_dom = __webpack_require__(65401);
18348
18367
  ;// CONCATENATED MODULE: ./src/modules/widget/tabs/tabs.ts
18349
18368
  /*!
18350
18369
  * Jodit Editor (https://xdsoft.net/jodit/)
@@ -18355,6 +18374,8 @@ var component = __webpack_require__(2624);
18355
18374
 
18356
18375
 
18357
18376
 
18377
+
18378
+
18358
18379
  const TabsWidget = (jodit, tabs, state) => {
18359
18380
  const box = jodit.c.div('jodit-tabs'), tabBox = jodit.c.div('jodit-tabs__wrapper'), buttons = jodit.c.div('jodit-tabs__buttons'), nameToTab = {}, buttonList = [];
18360
18381
  let firstTab = '', tabCount = 0;
@@ -18382,7 +18403,7 @@ const TabsWidget = (jodit, tabs, state) => {
18382
18403
  buttons.appendChild(button.container);
18383
18404
  buttonList.push(button);
18384
18405
  button.container.classList.add('jodit-tabs__button', 'jodit-tabs__button_columns_' + tabs.length);
18385
- if (!(0,helpers.isFunction)(content)) {
18406
+ if (!(0,is_function/* isFunction */.m)(content)) {
18386
18407
  tab.appendChild(component/* Component.isInstanceOf */.wA.isInstanceOf(content, ui/* UIElement */.u1)
18387
18408
  ? content.container
18388
18409
  : content);
@@ -18393,7 +18414,7 @@ const TabsWidget = (jodit, tabs, state) => {
18393
18414
  tabBox.appendChild(tab);
18394
18415
  button.onAction(() => {
18395
18416
  setActive(name);
18396
- if ((0,helpers.isFunction)(content)) {
18417
+ if ((0,is_function/* isFunction */.m)(content) && !dom_dom/* Dom.isElement */.i.isElement(content)) {
18397
18418
  content.call(jodit);
18398
18419
  }
18399
18420
  if (state) {