jodit 3.15.2 → 3.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/.idea/workspace.xml +301 -299
  2. package/CHANGELOG.MD +88 -7
  3. package/CONTRIBUTING.md +97 -0
  4. package/README.md +7 -7
  5. package/build/jodit.css +38 -32
  6. package/build/jodit.es2018.css +37 -31
  7. package/build/jodit.es2018.en.css +37 -31
  8. package/build/jodit.es2018.en.js +1981 -1393
  9. package/build/jodit.es2018.en.min.css +1 -1
  10. package/build/jodit.es2018.en.min.js +1 -1
  11. package/build/jodit.es2018.js +2053 -1447
  12. package/build/jodit.es2018.min.css +1 -1
  13. package/build/jodit.es2018.min.js +1 -1
  14. package/build/jodit.js +3475 -2625
  15. package/build/jodit.min.css +2 -2
  16. package/build/jodit.min.js +1 -1
  17. package/build/vdom.css +1 -1
  18. package/build/vdom.js +32 -20
  19. package/package.json +13 -13
  20. package/src/README.md +1 -1
  21. package/src/config.ts +69 -36
  22. package/src/core/async/async.ts +46 -24
  23. package/src/core/constants.ts +1 -0
  24. package/src/core/decorators/README.md +35 -0
  25. package/src/core/decorators/cache/cache.ts +1 -1
  26. package/src/core/decorators/debounce/debounce.ts +20 -9
  27. package/src/core/decorators/idle/README.md +14 -0
  28. package/src/core/decorators/idle/idle.ts +1 -1
  29. package/src/core/decorators/watch/watch.ts +8 -7
  30. package/src/core/dom/README.md +42 -0
  31. package/src/core/dom/dom.ts +37 -23
  32. package/src/core/dom/index.ts +1 -0
  33. package/src/core/dom/lazy-walker.ts +133 -0
  34. package/src/core/event-emitter/event-emitter.ts +8 -8
  35. package/src/core/event-emitter/eventify.ts +73 -0
  36. package/src/core/event-emitter/index.ts +1 -0
  37. package/src/core/helpers/html/apply-styles.ts +1 -1
  38. package/src/core/helpers/html/strip-tags.ts +3 -2
  39. package/src/core/helpers/string/fuzzy-search-index.ts +58 -0
  40. package/src/core/helpers/string/i18n.ts +1 -1
  41. package/src/core/helpers/string/index.ts +3 -2
  42. package/src/core/helpers/utils/append-script.ts +1 -1
  43. package/src/core/helpers/utils/css.ts +1 -1
  44. package/src/core/helpers/utils/selector.ts +1 -1
  45. package/src/core/helpers/utils/utils.ts +3 -3
  46. package/src/core/plugin/plugin-system.ts +14 -8
  47. package/src/core/request/ajax.ts +3 -3
  48. package/src/core/selection/select.ts +10 -10
  49. package/src/core/selection/style/api/toggle/toggle-css.ts +5 -2
  50. package/src/core/selection/style/api/wrap-unwrapped-text.ts +1 -1
  51. package/src/core/selection/style/apply-style.ts +4 -4
  52. package/src/core/storage/engines/local-storage-provider.ts +20 -19
  53. package/src/core/ui/button/button/button.ts +5 -5
  54. package/src/core/ui/element.ts +2 -2
  55. package/src/core/ui/form/inputs/input/input.ts +1 -1
  56. package/src/core/ui/form/inputs/select/select.ts +1 -1
  57. package/src/core/ui/group/list.ts +2 -2
  58. package/src/core/vdom/render/index.ts +12 -8
  59. package/src/core/vdom/v-dom-jodit.ts +1 -1
  60. package/src/core/view/view.ts +1 -1
  61. package/src/index.ts +3 -3
  62. package/src/jodit.ts +72 -55
  63. package/src/langs/README.md +1 -1
  64. package/src/langs/ar.js +2 -1
  65. package/src/langs/cs_cz.js +2 -1
  66. package/src/langs/de.js +2 -1
  67. package/src/langs/es.js +2 -1
  68. package/src/langs/fa.js +2 -1
  69. package/src/langs/fr.js +2 -1
  70. package/src/langs/he.js +2 -1
  71. package/src/langs/hu.js +2 -1
  72. package/src/langs/id.js +2 -1
  73. package/src/langs/index.ts +1 -1
  74. package/src/langs/it.js +2 -1
  75. package/src/langs/ja.js +2 -1
  76. package/src/langs/ko.js +2 -1
  77. package/src/langs/nl.js +2 -1
  78. package/src/langs/pl.js +2 -1
  79. package/src/langs/pt_br.js +2 -1
  80. package/src/langs/ru.js +2 -1
  81. package/src/langs/tr.js +2 -1
  82. package/src/langs/zh_cn.js +2 -1
  83. package/src/langs/zh_tw.js +2 -1
  84. package/src/modules/dialog/dialog.ts +6 -6
  85. package/src/modules/dialog/prompt.ts +1 -1
  86. package/src/modules/file-browser/README.md +2 -2
  87. package/src/modules/file-browser/builders/context-menu.ts +12 -13
  88. package/src/modules/file-browser/fetch/load-tree.ts +1 -1
  89. package/src/modules/file-browser/file-browser.ts +10 -7
  90. package/src/modules/history/README.md +5 -0
  91. package/src/modules/{observer → history}/command.ts +5 -5
  92. package/src/modules/{observer/observer.ts → history/history.ts} +97 -55
  93. package/src/modules/{observer → history}/snapshot.ts +3 -4
  94. package/src/modules/{observer → history}/stack.ts +4 -4
  95. package/src/modules/image-editor/image-editor.ts +8 -8
  96. package/src/modules/image-editor/templates/form.ts +2 -2
  97. package/src/modules/index.ts +3 -3
  98. package/src/modules/status-bar/status-bar.ts +4 -0
  99. package/src/modules/table/table.ts +2 -2
  100. package/src/modules/toolbar/button/button.ts +2 -2
  101. package/src/modules/toolbar/collection/collection.ts +1 -1
  102. package/src/modules/uploader/helpers/process-old-browser-drag.ts +1 -1
  103. package/src/modules/uploader/helpers/send-files.ts +1 -1
  104. package/src/modules/uploader/helpers/send.ts +1 -1
  105. package/src/modules/uploader/uploader.ts +3 -3
  106. package/src/modules/widget/color-picker/color-picker.ts +2 -3
  107. package/src/modules/widget/tabs/tabs.ts +17 -12
  108. package/src/plugins/add-new-line/add-new-line.ts +8 -8
  109. package/src/plugins/class-span/class-span.ts +1 -1
  110. package/src/plugins/clipboard/copy-format.ts +1 -1
  111. package/src/plugins/clipboard/drag-and-drop-element.ts +4 -2
  112. package/src/plugins/clipboard/paste/config.ts +19 -3
  113. package/src/plugins/clipboard/paste/helpers.ts +17 -50
  114. package/src/plugins/clipboard/paste/interface.ts +6 -0
  115. package/src/plugins/clipboard/paste/paste.ts +22 -8
  116. package/src/plugins/clipboard/paste-from-word/config.ts +17 -0
  117. package/src/plugins/clipboard/paste-from-word/paste-from-word.ts +15 -6
  118. package/src/plugins/clipboard/paste-storage/paste-storage.ts +6 -6
  119. package/src/plugins/color/color.ts +2 -2
  120. package/src/plugins/error-messages/error-messages.ts +2 -2
  121. package/src/plugins/fix/clean-html/README.md +26 -0
  122. package/src/plugins/fix/{clean-html.ts → clean-html/clean-html.ts} +59 -142
  123. package/src/plugins/fix/clean-html/config.ts +106 -0
  124. package/src/plugins/fix/index.ts +12 -0
  125. package/src/plugins/fix/wrap-nodes/README.md +27 -0
  126. package/src/plugins/fix/wrap-nodes/config.ts +24 -0
  127. package/src/plugins/fix/{wrap-text-nodes.ts → wrap-nodes/wrap-nodes.ts} +9 -4
  128. package/src/plugins/focus/focus.ts +1 -1
  129. package/src/plugins/format-block/format-block.ts +1 -1
  130. package/src/plugins/fullsize/fullsize.ts +4 -4
  131. package/src/plugins/iframe/iframe.ts +3 -3
  132. package/src/plugins/image/image-properties/image-properties.ts +12 -13
  133. package/src/plugins/indent/indent.ts +1 -1
  134. package/src/plugins/index.ts +2 -2
  135. package/src/plugins/inline-popup/config/items/a.ts +2 -2
  136. package/src/plugins/inline-popup/config/items/cells.ts +11 -11
  137. package/src/plugins/inline-popup/config/items/iframe.ts +1 -1
  138. package/src/plugins/inline-popup/config/items/img.ts +7 -7
  139. package/src/plugins/inline-popup/inline-popup.ts +5 -5
  140. package/src/plugins/keyboard/backspace/backspace.ts +1 -1
  141. package/src/plugins/keyboard/backspace/cases/check-join-neighbors.ts +1 -1
  142. package/src/plugins/keyboard/helpers.ts +1 -1
  143. package/src/plugins/keyboard/hotkeys.ts +1 -1
  144. package/src/plugins/limit/limit.ts +3 -3
  145. package/src/plugins/line-height/line-height.ts +1 -1
  146. package/src/plugins/link/link.ts +8 -8
  147. package/src/plugins/link/template.ts +2 -2
  148. package/src/plugins/media/file.ts +1 -1
  149. package/src/plugins/media/media.ts +1 -1
  150. package/src/plugins/media/video/config.ts +1 -1
  151. package/src/plugins/mobile/config.ts +1 -1
  152. package/src/plugins/mobile/mobile.ts +1 -1
  153. package/src/plugins/ordered-list/config.ts +61 -0
  154. package/src/plugins/ordered-list/ordered-list.ts +3 -153
  155. package/src/plugins/placeholder/placeholder.ts +3 -3
  156. package/src/plugins/print/helpers.ts +14 -7
  157. package/src/plugins/print/index.ts +1 -1
  158. package/src/plugins/print/{preview.less → preview/preview.less} +1 -1
  159. package/src/plugins/print/{preview.ts → preview/preview.ts} +9 -8
  160. package/src/plugins/print/print.ts +19 -10
  161. package/src/plugins/redo-undo/redo-undo.ts +3 -3
  162. package/src/plugins/resizer/resizer.ts +11 -11
  163. package/src/plugins/search/README.md +38 -0
  164. package/src/plugins/search/config.ts +82 -0
  165. package/src/plugins/search/helpers/index.ts +12 -0
  166. package/src/plugins/search/helpers/sentence-finder.ts +103 -0
  167. package/src/plugins/search/helpers/wrap-ranges-texts-in-tmp-span.ts +120 -0
  168. package/src/plugins/search/search.ts +269 -615
  169. package/src/plugins/search/ui/search.less +159 -0
  170. package/src/plugins/search/ui/search.ts +256 -0
  171. package/src/plugins/select/select.ts +1 -1
  172. package/src/plugins/size/config.ts +8 -8
  173. package/src/plugins/size/resize-handler.ts +3 -3
  174. package/src/plugins/size/size.ts +4 -4
  175. package/src/plugins/source/editor/engines/ace.ts +9 -9
  176. package/src/plugins/source/editor/engines/area.ts +3 -3
  177. package/src/plugins/source/source.ts +6 -6
  178. package/src/plugins/spellcheck/README.md +1 -0
  179. package/src/plugins/spellcheck/config.ts +34 -0
  180. package/src/plugins/spellcheck/spellcheck.svg +4 -0
  181. package/src/plugins/spellcheck/spellcheck.ts +48 -0
  182. package/src/plugins/sticky/sticky.ts +3 -3
  183. package/src/plugins/table/resize-cells.ts +11 -11
  184. package/src/plugins/table/select-cells.ts +2 -2
  185. package/src/plugins/tooltip/tooltip.ts +1 -1
  186. package/src/plugins/xpath/xpath.ts +8 -8
  187. package/src/polyfills.ts +5 -4
  188. package/src/styles/icons/README.md +2 -2
  189. package/src/types/async.d.ts +12 -2
  190. package/src/types/core.ts +1 -1
  191. package/src/types/events.d.ts +6 -2
  192. package/src/types/file-browser.d.ts +1 -2
  193. package/{types/types/observer.d.ts → src/types/history.d.ts} +11 -7
  194. package/src/types/index.d.ts +1 -1
  195. package/src/types/jodit.d.ts +12 -4
  196. package/src/types/toolbar.d.ts +5 -5
  197. package/src/types/types.d.ts +11 -4
  198. package/types/config.d.ts +68 -35
  199. package/types/core/async/async.d.ts +11 -4
  200. package/types/core/constants.d.ts +1 -0
  201. package/types/core/dom/dom.d.ts +3 -5
  202. package/types/core/dom/index.d.ts +1 -0
  203. package/types/core/dom/lazy-walker.d.ts +37 -0
  204. package/types/core/event-emitter/eventify.d.ts +39 -0
  205. package/types/core/event-emitter/index.d.ts +1 -0
  206. package/types/core/helpers/string/fuzzy-search-index.d.ts +10 -0
  207. package/types/core/helpers/string/i18n.d.ts +1 -1
  208. package/types/core/helpers/string/index.d.ts +3 -2
  209. package/types/core/helpers/utils/utils.d.ts +1 -1
  210. package/types/core/selection/select.d.ts +1 -1
  211. package/types/core/ui/button/button/button.d.ts +4 -4
  212. package/types/core/view/view.d.ts +1 -1
  213. package/types/jodit.d.ts +19 -6
  214. package/types/modules/{observer → history}/command.d.ts +4 -4
  215. package/types/modules/{observer/observer.d.ts → history/history.d.ts} +17 -9
  216. package/types/modules/{observer → history}/snapshot.d.ts +1 -1
  217. package/types/modules/{observer → history}/stack.d.ts +3 -3
  218. package/types/modules/image-editor/image-editor.d.ts +1 -1
  219. package/types/modules/index.d.ts +3 -3
  220. package/types/modules/toolbar/button/button.d.ts +2 -5
  221. package/types/modules/widget/tabs/tabs.d.ts +1 -1
  222. package/types/plugins/class-span/class-span.d.ts +1 -1
  223. package/types/plugins/clipboard/paste/config.d.ts +8 -0
  224. package/types/plugins/clipboard/paste/helpers.d.ts +2 -2
  225. package/types/plugins/clipboard/paste/interface.d.ts +5 -0
  226. package/types/plugins/clipboard/paste-from-word/config.d.ts +5 -0
  227. package/types/plugins/clipboard/paste-from-word/paste-from-word.d.ts +3 -2
  228. package/types/plugins/fix/clean-html/clean-html.d.ts +70 -0
  229. package/types/plugins/fix/{clean-html.d.ts → clean-html/config.d.ts} +2 -57
  230. package/types/plugins/fix/index.d.ts +10 -0
  231. package/types/plugins/fix/wrap-nodes/config.d.ts +16 -0
  232. package/types/plugins/fix/{wrap-text-nodes.d.ts → wrap-nodes/wrap-nodes.d.ts} +5 -2
  233. package/types/plugins/fullsize/fullsize.d.ts +2 -2
  234. package/types/plugins/index.d.ts +2 -2
  235. package/types/plugins/ordered-list/config.d.ts +6 -0
  236. package/types/plugins/ordered-list/ordered-list.d.ts +1 -1
  237. package/types/plugins/print/helpers.d.ts +2 -2
  238. package/types/plugins/print/index.d.ts +1 -1
  239. package/types/plugins/print/{preview.d.ts → preview/preview.d.ts} +1 -1
  240. package/types/plugins/search/config.d.ts +36 -0
  241. package/types/plugins/search/helpers/index.d.ts +10 -0
  242. package/types/plugins/search/helpers/sentence-finder.d.ts +21 -0
  243. package/types/plugins/search/helpers/wrap-ranges-texts-in-tmp-span.d.ts +14 -0
  244. package/types/plugins/search/search.d.ts +25 -39
  245. package/types/plugins/search/ui/search.d.ts +37 -0
  246. package/types/plugins/spellcheck/config.d.ts +15 -0
  247. package/types/plugins/spellcheck/spellcheck.d.ts +19 -0
  248. package/types/plugins/sticky/sticky.d.ts +2 -2
  249. package/types/types/async.d.ts +12 -2
  250. package/types/types/core.d.ts +1 -1
  251. package/types/types/core.ts +1 -1
  252. package/types/types/events.d.ts +6 -2
  253. package/types/types/file-browser.d.ts +1 -2
  254. package/{src/types/observer.d.ts → types/types/history.d.ts} +11 -7
  255. package/types/types/index.d.ts +1 -1
  256. package/types/types/jodit.d.ts +12 -4
  257. package/types/types/toolbar.d.ts +5 -5
  258. package/types/types/types.d.ts +11 -4
  259. package/src/modules/observer/README.md +0 -0
  260. package/src/plugins/search/search.less +0 -152
package/CHANGELOG.MD CHANGED
@@ -9,6 +9,87 @@
9
9
  > - :house: [Internal]
10
10
  > - :nail_care: [Polish]
11
11
 
12
+ ## 3.16.2
13
+
14
+ #### :bug: Bug Fix
15
+
16
+ - ["Uncaught TypeError: this.setEditorValue is not a function" with Japanese input method #807](https://github.com/xdan/jodit/issues/807)
17
+
18
+ ## 3.16.1
19
+
20
+ #### :rocket: New Feature
21
+
22
+ - Added `spellcheck` plugin.
23
+ - Added `Config.pasteHTMLActionList` and `Config.pasteFromWordActionList` options https://github.com/xdan/jodit/issues/802.
24
+ - Added `Jodit.synchronizeValues()` method. The method synchronizes the WYSIWYG values of the editor
25
+ - and the original input field. The method works through `Async.throttle`.
26
+ - Added a new class for working with DOM without blocking the main thread `LazyWalker`
27
+ - Search engine replace on `LazyWalker`
28
+ - CleanHTML plugin engine replace on `LazyWalker`
29
+ - Search plugin now highlights all found options https://github.com/xdan/jodit/issues/798
30
+ - Added `Jodit.constants` https://github.com/xdan/jodit/issues/806
31
+
32
+ #### :boom: Breaking Change
33
+
34
+ - Renamed `wrap-text-nodes` plugin to `wrap-nodes`
35
+ - Option `spellcheck` = false by default. This is due to the fact that the built-in spell check slows down the editor very much on large tests.
36
+ - Enabled `@typescript-eslint/explicit-function-return-type` in eslint
37
+
38
+ #### :bug: Bug Fix
39
+
40
+ - Fixed a bug in the `watch` decorator, when multiple watchers were set, it used only one context
41
+ - [Default is not working for insert ordered list and insert unordered list #799](https://github.com/xdan/jodit/issues/799)
42
+ - [In print preview, table border color and background color is not showing #803](https://github.com/xdan/jodit/issues/803)
43
+
44
+ #### :house: Internal
45
+
46
+ - `clean-html` plugin now works via `requestIdleCallback` and doesn't slow down the browser
47
+
48
+ ## 3.15.3
49
+
50
+ #### :boom: Breaking Change
51
+
52
+ - `Observer` module renamed to `History`, accessed via `Jodit.history`
53
+ - `Jodit.observer` field deprecated and will be removed in future releases
54
+ - Changed to `history` in `observer` settings. The `observer` field has been deprecated.
55
+ - Removed `stack` field from `History` class (former `Observer`).
56
+ - Separated default editor timeout and `history.timeout`. Now the second setting is just for history.
57
+ Timeouts for all asynchronous operations in Jodit now apply the `defaultTimeout` setting
58
+
59
+ Before:
60
+
61
+ ```js
62
+ const editor = Jodit.make({
63
+ observer: {
64
+ timeout: 122,
65
+ maxHistoryLength: 100
66
+ }
67
+ });
68
+ console.log(editor.defaultTimeout); // 122
69
+ editor.observer.stack.clear();
70
+ ```
71
+
72
+ Now:
73
+
74
+ ```js
75
+ const editor = Jodit.make({
76
+ defaultTimeout: 122,
77
+ history: {
78
+ timeout: 1000,
79
+ maxHistoryLength: 100
80
+ }
81
+ });
82
+ console.log(editor.defaultTimeout); // 122
83
+ editor.history.clear();
84
+ ```
85
+
86
+ - When adding information to the editor via `Jodit.value`, the history of changes will be process immediately,
87
+ without a timeout. Read more https://github.com/xdan/jodit/issues/792
88
+
89
+ #### :bug: Bug Fix
90
+
91
+ - [Colors popup closes when I select the secondary tab (Text) #171](https://github.com/jodit/jodit-react/issues/171)
92
+
12
93
  ## 3.15.2
13
94
 
14
95
  - Fixed a bug when it was impossible to select a normal font after selecting any other
@@ -1147,11 +1228,11 @@ Related with https://github.com/xdan/jodit/issues/574. In some cases need to lim
1147
1228
  - @property {IUIOption[]} link.selectOptionsClassName=[] The list of the option for the select (to use with
1148
1229
  modeClassName="select")
1149
1230
  - ex: [
1150
- - { value: "", text: "" },
1151
- - { value: "val1", text: "text1" },
1152
- - { value: "val2", text: "text2" },
1153
- - { value: "val3", text: "text3" }
1154
- - ]
1231
+ - { value: "", text: "" },
1232
+ - { value: "val1", text: "text1" },
1233
+ - { value: "val2", text: "text2" },
1234
+ - { value: "val3", text: "text3" }
1235
+ - ]
1155
1236
  PR: https://github.com/xdan/jodit/pull/577 Thanks @s-renier-taonix-fr
1156
1237
 
1157
1238
  ##### New option `statusbar: boolean = true`
@@ -1462,12 +1543,12 @@ https://github.com/xdan/jodit/issues/359
1462
1543
  ### Features
1463
1544
 
1464
1545
  - All `less` variables were replaced to css custom properties for modern browsers.
1465
- - Added `WrapTextNodes` plugin - it wrap all alone text node(or inline elements) inside `options.enter` element. You can
1546
+ - Added `WrapNodes` plugin - it wrap all alone text node(or inline elements) inside `options.enter` element. You can
1466
1547
  disable this behaviour:
1467
1548
 
1468
1549
  ```js
1469
1550
  const editor = Jodit.make('#editor', {
1470
- disablePlugins: ['WrapTextNodes']
1551
+ disablePlugins: ['WrapNodes']
1471
1552
  });
1472
1553
  ```
1473
1554
 
@@ -0,0 +1,97 @@
1
+ # Contributing
2
+
3
+ Jodit is an open source project and we would really appreciate your contributions.
4
+ You can help us by fixing bugs, reporting them, or translating the editor interface.
5
+
6
+ ## TL;DR
7
+
8
+ ```bash
9
+ git clone git@github.com:xdan/jodit.git && cd jodit && npm install
10
+ ```
11
+
12
+ Change code + add autotest in `test/tests/` folder. Run
13
+
14
+ ```bash
15
+ npm run lint && npm test
16
+ ```
17
+
18
+ Fix it and commit your changes:
19
+
20
+ ```bash
21
+ git commit -m "Fixed issue smt"
22
+ git checkout -b i/GITHUB-ISSUE-NUMBER
23
+ git push
24
+ ````
25
+
26
+ In your repository in the GitHub interface, create a pull request.
27
+
28
+ ## Fixing issues and adding features
29
+
30
+ Before you start, here are some things to keep in mind:
31
+
32
+ - We expect contributions to conform to the high quality code standards we follow, including [coding style](#code-style) and [tests](#tests). Lack of attention to this point can either slow down the acceptance of the contribution, or even cause us to reject it completely.
33
+ - There is no guarantee your contribution will be included in the project code. However, pull requests make it easy for you to keep them for your own use or for others who might be interested in them.
34
+ - If you need help creating a patch or implementing a feature, please submit a ticket to us on the issue tracker.
35
+
36
+ ### Code style
37
+
38
+ In order for the code to match the general style, you can simply run prettier:
39
+
40
+ ```bash
41
+ npx prettier ./src/%YOUR_PATCHED_FILE_PATH% --write
42
+ ````
43
+
44
+ It is also important that before you create a PR, you run the command without errors:
45
+
46
+ ```bash
47
+ npm run lint
48
+ ```
49
+
50
+ We follow simple code formatting rules that your IDE or editor will tell you.
51
+
52
+ ### Tests
53
+
54
+ Before doing any functionality or fixing a bug, you need to create a test for it.
55
+ We follow the [TDD](https://en.wikipedia.orgwikiTest-driven_development) methodology, i.e. first we write an autotest, and then a functional.
56
+ It would be absolutely impossible to maintain our editor without autotests. Therefore, this is one of the most important things you need to do in your PR.
57
+
58
+ ### Creating a pull request
59
+
60
+ > GitHub provides an [excellent documentation about pull requests](https://help.github.com/categories/collaborating-with-issues-and-pull-requests/). If you are not sure what to do, this is the right place to start.
61
+
62
+ Assuming that you would like to propose some changes, these are the steps you should take to create a pull request:
63
+
64
+ 1. Make sure to open a ticket in https://github.com/xdan/jodit describing the issue, feature or problem that you want to solve in your pull request. This can be skipped in case of obvious and trivial changes (typos, documentation, etc.).
65
+ 2. Go to GitHub and [fork the repository](https://help.github.com/articles/fork-a-repo). The forked repository will appear in your GitHub account as `https://github.com/YOUR-USERNAME/jodit`.
66
+ 3. Open your terminal, then go to the package ("repository") folder in your development environment:
67
+
68
+ ```bash
69
+ $ cd path/to/jodit
70
+ ```
71
+
72
+ 1. Start a new branch for your code. We use the `i/GITHUB-ISSUE-NUMBER` convention for branch names:
73
+
74
+ ```bash
75
+ $ git checkout -b i/GITHUB-ISSUE-NUMBER
76
+ ```
77
+
78
+ 1. Make the changes. Stick to the [code-style guidelines](#code-style) and remember about [tests](#tests)!
79
+ 2. Commit your changes:
80
+
81
+ ```bash
82
+ $ git commit -m "Fixed issue smt."
83
+ ```
84
+
85
+ 1. Now it is time to make your changes public. First, you need to let `git` know about the fork you created by adding the remote:
86
+
87
+ ```bash
88
+ $ git remote add my-fork https://github.com/YOUR-USERNAME/jodit
89
+ ```
90
+
91
+ 1. Push your changes to your forked repository:
92
+
93
+ ```bash
94
+ $ git push my-fork i/GITHUB-ISSUE-NUMBER
95
+ ```
96
+
97
+ 1. Go to your forked repository on GitHub. Use the [pull request button](https://help.github.com/articles/about-pull-requests/) and follow the instructions.
package/README.md CHANGED
@@ -13,7 +13,7 @@ An excellent WYSIWYG editor written in pure TypeScript without the use of additi
13
13
  - [Playground - play with options](https://xdsoft.net/jodit/play.html)
14
14
  - [Documentation](https://xdsoft.net/jodit/docs/)
15
15
  - [Download & Changes](https://github.com/xdan/jodit/releases)
16
- - [Changelog](https://github.com/xdan/jodit/blob/master/CHANGELOG.MD)
16
+ - [Changelog](https://github.com/xdan/jodit/blob/master/CHANGELOG.md)
17
17
  - [Examples](https://xdan.github.io/jodit/examples/)
18
18
 
19
19
  ## Get Started
@@ -71,7 +71,7 @@ And some `<textarea>` element
71
71
  After this, you can init Jodit plugin
72
72
 
73
73
  ```javascript
74
- var editor = new Jodit('#editor');
74
+ var editor = Jodit.make('#editor');
75
75
  editor.value = '<p>start</p>';
76
76
  ```
77
77
 
@@ -86,7 +86,7 @@ with jQuery
86
86
 
87
87
  ```javascript
88
88
  $('textarea').each(function () {
89
- var editor = new Jodit(this);
89
+ var editor = Jodit.make(this);
90
90
  editor.value = '<p>start</p>';
91
91
  });
92
92
  ```
@@ -156,7 +156,7 @@ php -S localhost:8181 -t ./
156
156
  and set options for Jodit:
157
157
 
158
158
  ```javascript
159
- var editor = new Jodit('#editor', {
159
+ var editor = Jodit.make('#editor', {
160
160
  uploader: {
161
161
  url: 'http://localhost:8181/index-test.php?action=fileUpload'
162
162
  },
@@ -181,7 +181,7 @@ Jodit.plugins.yourplugin = function (editor) {
181
181
  ### Add custom button
182
182
 
183
183
  ```javascript
184
- var editor = new Jodit('.someselector', {
184
+ var editor = Jodit.make('.someselector', {
185
185
  extraButtons: [
186
186
  {
187
187
  name: 'insertDate',
@@ -197,7 +197,7 @@ var editor = new Jodit('.someselector', {
197
197
  or
198
198
 
199
199
  ```javascript
200
- var editor = new Jodit('.someselector', {
200
+ var editor = Jodit.make('.someselector', {
201
201
  buttons: ['bold', 'insertDate'],
202
202
  controls: {
203
203
  insertDate: {
@@ -253,7 +253,7 @@ Jodit.plugins.add(
253
253
  }
254
254
  );
255
255
 
256
- var editor = new Jodit('.someselector', {
256
+ var editor = Jodit.make('.someselector', {
257
257
  buttons: ['bold', 'insertText'],
258
258
  controls: {
259
259
  insertText: {
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.15.2
4
+ * Version: v3.16.2
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.15.2
11
+ * Version: v3.16.2
12
12
  * Url: https://xdsoft.net/jodit/
13
13
  * License(s): MIT
14
14
  */
@@ -5209,21 +5209,17 @@ html.jodit_fullsize-box_true {
5209
5209
  * Released under MIT see LICENSE.txt in the project root for license information.
5210
5210
  * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5211
5211
  */
5212
- .jodit-search {
5212
+ .jodit-ui-search {
5213
5213
  position: absolute;
5214
5214
  top: 0;
5215
5215
  right: 0;
5216
5216
  width: 0;
5217
5217
  height: 0;
5218
- visibility: hidden;
5219
5218
  }
5220
- .jodit-search_sticky {
5219
+ .jodit-ui-search_sticky_true {
5221
5220
  position: fixed;
5222
5221
  }
5223
- .jodit-search.jodit-search_active {
5224
- visibility: visible;
5225
- }
5226
- .jodit-search .jodit-search__box {
5222
+ .jodit-ui-search__box {
5227
5223
  position: absolute;
5228
5224
  right: 0;
5229
5225
  display: -webkit-box;
@@ -5236,7 +5232,7 @@ html.jodit_fullsize-box_true {
5236
5232
  border-width: 0 0 1px 1px;
5237
5233
  background-color: #f9f9f9;
5238
5234
  }
5239
- .jodit-search .jodit-search__box input {
5235
+ .jodit-ui-search__box input {
5240
5236
  width: 100%;
5241
5237
  height: 100%;
5242
5238
  padding: 0 8px;
@@ -5245,26 +5241,26 @@ html.jodit_fullsize-box_true {
5245
5241
  background-color: transparent;
5246
5242
  outline: none;
5247
5243
  }
5248
- .jodit-search .jodit-search__box input[data-ref='replace'] {
5244
+ .jodit-ui-search__box input[data-ref='replace'] {
5249
5245
  display: none;
5250
5246
  }
5251
- .jodit-search .jodit-search__box input:not(:focus) + input:not(:focus) {
5247
+ .jodit-ui-search__box input:not(:focus) + input:not(:focus) {
5252
5248
  border-top: 1px solid #dadada;
5253
5249
  }
5254
- .jodit-search .jodit-search__box .jodit-search__buttons {
5250
+ .jodit-ui-search__buttons {
5255
5251
  height: 30px;
5256
5252
  }
5257
- .jodit-search .jodit-search__box .jodit-search__counts {
5253
+ .jodit-ui-search__counts {
5258
5254
  height: 30px;
5259
5255
  }
5260
- .jodit-search .jodit-search__box .jodit-search__inputs {
5256
+ .jodit-ui-search__inputs {
5261
5257
  height: 30px;
5262
5258
  }
5263
- .jodit-search .jodit-search__box .jodit-search__inputs {
5259
+ .jodit-ui-search__inputs {
5264
5260
  width: 60%;
5265
5261
  padding-right: calc(8px / 2);
5266
5262
  }
5267
- .jodit-search .jodit-search__box .jodit-search__counts {
5263
+ .jodit-ui-search__counts {
5268
5264
  display: -webkit-box;
5269
5265
  display: -ms-flexbox;
5270
5266
  display: flex;
@@ -5278,7 +5274,7 @@ html.jodit_fullsize-box_true {
5278
5274
  border-left: 1px solid #dadada;
5279
5275
  color: #dadada;
5280
5276
  }
5281
- .jodit-search .jodit-search__box .jodit-search__buttons {
5277
+ .jodit-ui-search__buttons {
5282
5278
  display: -webkit-box;
5283
5279
  display: -ms-flexbox;
5284
5280
  display: flex;
@@ -5293,65 +5289,75 @@ html.jodit_fullsize-box_true {
5293
5289
  justify-content: center;
5294
5290
  padding-left: 0;
5295
5291
  }
5296
- .jodit-search .jodit-search__box .jodit-search__buttons button {
5292
+ .jodit-ui-search__buttons button {
5297
5293
  width: 32%;
5298
5294
  height: 100%;
5299
5295
  border: 1px solid transparent;
5300
5296
  margin-right: 1%;
5301
5297
  background-color: transparent;
5302
5298
  }
5303
- .jodit-search .jodit-search__box .jodit-search__buttons button[data-ref='replace-btn'] {
5299
+ .jodit-ui-search__buttons button[data-ref='replace-btn'] {
5304
5300
  display: none;
5305
5301
  width: 100%;
5306
5302
  border: 1px solid #dadada;
5307
5303
  margin-top: 2px;
5308
5304
  }
5309
- .jodit-search .jodit-search__box .jodit-search__buttons button:hover {
5305
+ .jodit-ui-search__buttons button:hover {
5310
5306
  background-color: #ecebe9;
5311
5307
  }
5312
- .jodit-search .jodit-search__box .jodit-search__buttons button:focus {
5308
+ .jodit-ui-search__buttons button:focus {
5313
5309
  border: 1px solid rgba(181, 214, 253, 0.5);
5314
5310
  }
5315
- .jodit-search .jodit-search__box .jodit-search__buttons button:active {
5311
+ .jodit-ui-search__buttons button:active {
5316
5312
  border: 1px solid #b5d6fd;
5317
5313
  -webkit-transform: scale(0.95, 0.95);
5318
5314
  -ms-transform: scale(0.95, 0.95);
5319
5315
  transform: scale(0.95, 0.95);
5320
5316
  }
5321
- .jodit-search.jodit-search_replace .jodit-search__counts {
5317
+ .jodit-ui-search_empty-query_true [data-ref='next'],
5318
+ .jodit-ui-search_empty-query_true [data-ref='prev'] {
5319
+ opacity: 0.5;
5320
+ }
5321
+ .jodit-ui-search_replace_true .jodit-ui-search__counts {
5322
5322
  height: calc(30px * 2);
5323
5323
  }
5324
- .jodit-search.jodit-search_replace .jodit-search__inputs {
5324
+ .jodit-ui-search_replace_true .jodit-ui-search__inputs {
5325
5325
  height: calc(30px * 2);
5326
5326
  }
5327
- .jodit-search.jodit-search_replace .jodit-search__counts input {
5327
+ .jodit-ui-search_replace_true .jodit-ui-search__counts input {
5328
5328
  height: 50%;
5329
5329
  -webkit-transition: background-color 0.1s linear;
5330
5330
  -o-transition: background-color 0.1s linear;
5331
5331
  transition: background-color 0.1s linear;
5332
5332
  }
5333
- .jodit-search.jodit-search_replace .jodit-search__inputs input {
5333
+ .jodit-ui-search_replace_true .jodit-ui-search__inputs input {
5334
5334
  height: 50%;
5335
5335
  -webkit-transition: background-color 0.1s linear;
5336
5336
  -o-transition: background-color 0.1s linear;
5337
5337
  transition: background-color 0.1s linear;
5338
5338
  }
5339
- .jodit-search.jodit-search_replace .jodit-search__counts input:focus {
5339
+ .jodit-ui-search_replace_true .jodit-ui-search__counts input:focus {
5340
5340
  -webkit-box-shadow: inset 0 0 3px 0 #dadada;
5341
5341
  box-shadow: inset 0 0 3px 0 #dadada;
5342
5342
  }
5343
- .jodit-search.jodit-search_replace .jodit-search__inputs input:focus {
5343
+ .jodit-ui-search_replace_true .jodit-ui-search__inputs input:focus {
5344
5344
  -webkit-box-shadow: inset 0 0 3px 0 #dadada;
5345
5345
  box-shadow: inset 0 0 3px 0 #dadada;
5346
5346
  }
5347
- .jodit-search.jodit-search_replace .jodit-search__buttons {
5347
+ .jodit-ui-search_replace_true .jodit-ui-search__counts input[data-ref='replace'],
5348
+ .jodit-ui-search_replace_true .jodit-ui-search__inputs input[data-ref='replace'] {
5349
+ display: block;
5350
+ }
5351
+ .jodit-ui-search_replace_true .jodit-ui-search__buttons {
5348
5352
  -ms-flex-wrap: wrap;
5349
5353
  flex-wrap: wrap;
5350
5354
  }
5351
- .jodit-search.jodit-search_replace .jodit-search__inputs input[data-ref='replace'],
5352
- .jodit-search.jodit-search_replace .jodit-search__buttons button[data-ref='replace-btn'] {
5355
+ .jodit-ui-search_replace_true .jodit-ui-search__buttons button[data-ref='replace-btn'] {
5353
5356
  display: block;
5354
5357
  }
5358
+ [jd-tmp-selection] {
5359
+ background-color: aquamarine;
5360
+ }
5355
5361
 
5356
5362
  /*!
5357
5363
  * Jodit Editor (https://xdsoft.net/jodit/)
@@ -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.15.2
4
+ * Version: v3.16.2
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -4338,21 +4338,17 @@ html.jodit_fullsize-box_true {
4338
4338
  --jd-transform-button-active: 0.95;
4339
4339
  --jd-timeout-button-active: 0.1s;
4340
4340
  }
4341
- .jodit-search {
4341
+ .jodit-ui-search {
4342
4342
  position: absolute;
4343
4343
  top: 0;
4344
4344
  right: 0;
4345
4345
  width: 0;
4346
4346
  height: 0;
4347
- visibility: hidden;
4348
4347
  }
4349
- .jodit-search_sticky {
4348
+ .jodit-ui-search_sticky_true {
4350
4349
  position: fixed;
4351
4350
  }
4352
- .jodit-search.jodit-search_active {
4353
- visibility: visible;
4354
- }
4355
- .jodit-search .jodit-search__box {
4351
+ .jodit-ui-search__box {
4356
4352
  position: absolute;
4357
4353
  right: 0;
4358
4354
  display: flex;
@@ -4363,7 +4359,7 @@ html.jodit_fullsize-box_true {
4363
4359
  border-width: 0 0 1px 1px;
4364
4360
  background-color: var(--jd-color-panel);
4365
4361
  }
4366
- .jodit-search .jodit-search__box input {
4362
+ .jodit-ui-search__box input {
4367
4363
  width: 100%;
4368
4364
  height: 100%;
4369
4365
  padding: 0 var(--jd-padding-default);
@@ -4372,22 +4368,22 @@ html.jodit_fullsize-box_true {
4372
4368
  background-color: transparent;
4373
4369
  outline: none;
4374
4370
  }
4375
- .jodit-search .jodit-search__box input[data-ref='replace'] {
4371
+ .jodit-ui-search__box input[data-ref='replace'] {
4376
4372
  display: none;
4377
4373
  }
4378
- .jodit-search .jodit-search__box input:not(:focus) + input:not(:focus) {
4374
+ .jodit-ui-search__box input:not(:focus) + input:not(:focus) {
4379
4375
  border-top: 1px solid var(--jd-color-border);
4380
4376
  }
4381
- .jodit-search .jodit-search__box .jodit-search__buttons,
4382
- .jodit-search .jodit-search__box .jodit-search__counts,
4383
- .jodit-search .jodit-search__box .jodit-search__inputs {
4377
+ .jodit-ui-search__buttons,
4378
+ .jodit-ui-search__counts,
4379
+ .jodit-ui-search__inputs {
4384
4380
  height: var(--jd-height-search);
4385
4381
  }
4386
- .jodit-search .jodit-search__box .jodit-search__inputs {
4382
+ .jodit-ui-search__inputs {
4387
4383
  width: var(--jd-width-search-input-box);
4388
4384
  padding-right: calc(var(--jd-padding-default) / 2);
4389
4385
  }
4390
- .jodit-search .jodit-search__box .jodit-search__counts {
4386
+ .jodit-ui-search__counts {
4391
4387
  display: flex;
4392
4388
  width: var(--jd-width-search-count-box);
4393
4389
  align-items: center;
@@ -4395,56 +4391,66 @@ html.jodit_fullsize-box_true {
4395
4391
  border-left: 1px solid var(--jd-color-border);
4396
4392
  color: var(--jd-color-border);
4397
4393
  }
4398
- .jodit-search .jodit-search__box .jodit-search__buttons {
4394
+ .jodit-ui-search__buttons {
4399
4395
  display: flex;
4400
4396
  flex: 1;
4401
4397
  align-items: center;
4402
4398
  justify-content: center;
4403
4399
  padding-left: 0;
4404
4400
  }
4405
- .jodit-search .jodit-search__box .jodit-search__buttons button {
4401
+ .jodit-ui-search__buttons button {
4406
4402
  width: 32%;
4407
4403
  height: 100%;
4408
4404
  border: 1px solid transparent;
4409
4405
  margin-right: 1%;
4410
4406
  background-color: transparent;
4411
4407
  }
4412
- .jodit-search .jodit-search__box .jodit-search__buttons button[data-ref='replace-btn'] {
4408
+ .jodit-ui-search__buttons button[data-ref='replace-btn'] {
4413
4409
  display: none;
4414
4410
  width: 100%;
4415
4411
  border: 1px solid var(--jd-color-border);
4416
4412
  margin-top: 2px;
4417
4413
  }
4418
- .jodit-search .jodit-search__box .jodit-search__buttons button:hover {
4414
+ .jodit-ui-search__buttons button:hover {
4419
4415
  background-color: var(--jd-color-background-button-hover);
4420
4416
  }
4421
- .jodit-search .jodit-search__box .jodit-search__buttons button:focus {
4417
+ .jodit-ui-search__buttons button:focus {
4422
4418
  border: 1px solid var(--jd-color-background-selection_opacity50);
4423
4419
  }
4424
- .jodit-search .jodit-search__box .jodit-search__buttons button:active {
4420
+ .jodit-ui-search__buttons button:active {
4425
4421
  border: 1px solid var(--jd-color-background-selection);
4426
4422
  transform: scale(var(--jd-transform-button-active), var(--jd-transform-button-active));
4427
4423
  }
4428
- .jodit-search.jodit-search_replace .jodit-search__counts,
4429
- .jodit-search.jodit-search_replace .jodit-search__inputs {
4424
+ .jodit-ui-search_empty-query_true [data-ref='next'],
4425
+ .jodit-ui-search_empty-query_true [data-ref='prev'] {
4426
+ opacity: 0.5;
4427
+ }
4428
+ .jodit-ui-search_replace_true .jodit-ui-search__counts,
4429
+ .jodit-ui-search_replace_true .jodit-ui-search__inputs {
4430
4430
  height: calc(var(--jd-height-search) * 2);
4431
4431
  }
4432
- .jodit-search.jodit-search_replace .jodit-search__counts input,
4433
- .jodit-search.jodit-search_replace .jodit-search__inputs input {
4432
+ .jodit-ui-search_replace_true .jodit-ui-search__counts input,
4433
+ .jodit-ui-search_replace_true .jodit-ui-search__inputs input {
4434
4434
  height: 50%;
4435
4435
  transition: background-color var(--jd-timeout-button-active) linear;
4436
4436
  }
4437
- .jodit-search.jodit-search_replace .jodit-search__counts input:focus,
4438
- .jodit-search.jodit-search_replace .jodit-search__inputs input:focus {
4437
+ .jodit-ui-search_replace_true .jodit-ui-search__counts input:focus,
4438
+ .jodit-ui-search_replace_true .jodit-ui-search__inputs input:focus {
4439
4439
  box-shadow: inset 0 0 3px 0 var(--jd-color-border);
4440
4440
  }
4441
- .jodit-search.jodit-search_replace .jodit-search__buttons {
4441
+ .jodit-ui-search_replace_true .jodit-ui-search__counts input[data-ref='replace'],
4442
+ .jodit-ui-search_replace_true .jodit-ui-search__inputs input[data-ref='replace'] {
4443
+ display: block;
4444
+ }
4445
+ .jodit-ui-search_replace_true .jodit-ui-search__buttons {
4442
4446
  flex-wrap: wrap;
4443
4447
  }
4444
- .jodit-search.jodit-search_replace .jodit-search__inputs input[data-ref='replace'],
4445
- .jodit-search.jodit-search_replace .jodit-search__buttons button[data-ref='replace-btn'] {
4448
+ .jodit-ui-search_replace_true .jodit-ui-search__buttons button[data-ref='replace-btn'] {
4446
4449
  display: block;
4447
4450
  }
4451
+ [jd-tmp-selection] {
4452
+ background-color: aquamarine;
4453
+ }
4448
4454
 
4449
4455
  /*!
4450
4456
  * Jodit Editor (https://xdsoft.net/jodit/)