jodit 3.8.2 → 3.8.3

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 (48) hide show
  1. package/.idea/workspace.xml +153 -155
  2. package/CHANGELOG.MD +36 -9
  3. package/app.css +2 -1
  4. package/build/jodit.css +73 -73
  5. package/build/jodit.es2018.css +56 -56
  6. package/build/jodit.es2018.en.css +56 -56
  7. package/build/jodit.es2018.en.js +172 -84
  8. package/build/jodit.es2018.en.min.css +1 -1
  9. package/build/jodit.es2018.en.min.js +2 -2
  10. package/build/jodit.es2018.js +172 -84
  11. package/build/jodit.es2018.min.css +1 -1
  12. package/build/jodit.es2018.min.js +2 -2
  13. package/build/jodit.js +835 -742
  14. package/build/jodit.min.css +2 -2
  15. package/build/jodit.min.js +2 -2
  16. package/package.json +7 -7
  17. package/src/config.ts +4 -4
  18. package/src/core/create.ts +15 -15
  19. package/src/core/helpers/css.ts +3 -5
  20. package/src/core/helpers/html/strip-tags.ts +36 -4
  21. package/src/core/helpers/selector.ts +6 -8
  22. package/src/core/helpers/size/get-scroll-parent.ts +28 -0
  23. package/src/core/helpers/size/index.ts +1 -0
  24. package/src/core/selection/select.ts +35 -45
  25. package/src/core/ui/button/button/button.less +4 -1
  26. package/src/core/ui/button/button/button.ts +6 -8
  27. package/src/core/ui/popup/popup.less +4 -4
  28. package/src/core/ui/popup/popup.ts +17 -7
  29. package/src/core/view/view-with-toolbar.less +3 -2
  30. package/src/jodit.ts +6 -3
  31. package/src/modules/dialog/dialog.ts +1 -2
  32. package/src/modules/file-browser/builders/context-menu.ts +1 -1
  33. package/src/modules/file-browser/listeners/state-listeners.ts +2 -1
  34. package/src/modules/file-browser/styles/preview.less +17 -14
  35. package/src/modules/widget/color-picker/color-picker.less +12 -11
  36. package/src/modules/widget/color-picker/color-picker.ts +20 -30
  37. package/src/plugins/clipboard/paste-storage/paste-storage.ts +9 -20
  38. package/src/plugins/fix/clean-html.ts +36 -3
  39. package/src/plugins/iframe.ts +12 -2
  40. package/src/plugins/link/link.ts +14 -2
  41. package/src/plugins/resizer/resizer.ts +22 -4
  42. package/src/plugins/size/resize-handler.ts +1 -1
  43. package/src/plugins/size/size.less +10 -7
  44. package/src/plugins/symbols/symbols.less +12 -7
  45. package/src/plugins/symbols/symbols.ts +9 -6
  46. package/src/plugins/xpath/xpath.ts +1 -1
  47. package/src/styles/jodit.less +1 -1
  48. package/src/types/ui.d.ts +9 -1
@@ -12,28 +12,31 @@
12
12
 
13
13
  .jodit-workplace {
14
14
  display: flex;
15
- flex-direction: column;
15
+ overflow: hidden;
16
16
  height: auto;
17
17
  min-height: 50px;
18
- overflow: hidden;
18
+ flex-direction: column;
19
19
  }
20
20
 
21
21
  .jodit-editor__resize {
22
22
  position: relative;
23
23
 
24
- a {
24
+ span {
25
25
  position: absolute;
26
- bottom: 0;
27
26
  right: 0;
28
- user-select: none;
27
+ bottom: 0;
28
+ overflow: hidden;
29
+
29
30
  width: 0;
30
31
  height: 0;
31
- overflow: hidden;
32
+
32
33
  border-width: @resizer-size @resizer-size 0 0;
34
+ border-style: dashed solid dashed dashed;
33
35
  border-color: rgba(0, 0, 0, 0) var(--color-border) rgba(0, 0, 0, 0)
34
36
  rgba(0, 0, 0, 0);
35
- border-style: dashed solid dashed dashed;
37
+
36
38
  cursor: se-resize;
39
+ user-select: none;
37
40
  }
38
41
  }
39
42
  }
@@ -24,10 +24,10 @@
24
24
  width: 12%;
25
25
 
26
26
  .jodit-symbols__preview {
27
- font-size: 34px;
28
- text-align: center;
29
27
  padding: 20px 0;
30
28
  border: 1px solid var(--color-border);
29
+ font-size: 34px;
30
+ text-align: center;
31
31
  }
32
32
  }
33
33
 
@@ -40,16 +40,21 @@
40
40
  padding: 0;
41
41
 
42
42
  a {
43
- font-size: 16px;
44
- text-decoration: none;
45
- color: var(--color-default);
46
43
  display: inline-block;
47
- box-sizing: border-box;
48
44
  width: calc(var(--width_element_default) * 1.2);
49
45
  height: calc(var(--height_element_default) * 1.2);
46
+
47
+ box-sizing: border-box;
48
+
50
49
  border: 1px solid transparent;
51
- text-align: center;
50
+ color: var(--color-default);
51
+ cursor: pointer;
52
+
53
+ font-size: 16px;
52
54
  line-height: calc(var(--height_element_default) * 1.2);
55
+ text-align: center;
56
+
57
+ text-decoration: none;
53
58
  vertical-align: top;
54
59
 
55
60
  &:hover,
@@ -37,10 +37,14 @@ export class symbols extends Plugin {
37
37
  override afterInit(jodit: IJodit): void {
38
38
  jodit.e.on('generateSpecialCharactersTable.symbols', () => {
39
39
  const container = jodit.c.fromHTML(
40
- '<div class="jodit-symbols__container">' +
41
- '<div class="jodit-symbols__container_table"><table><tbody></tbody></table></div>' +
42
- '<div class="jodit-symbols__container_preview"><div class="jodit-symbols__preview"></div></div>' +
43
- '</div>'
40
+ `<div class="jodit-symbols__container">
41
+ <div class="jodit-symbols__container_table">
42
+ <table><tbody></tbody></table>
43
+ </div>
44
+ <div class="jodit-symbols__container_preview">
45
+ <div class="jodit-symbols__preview"></div>
46
+ </div>
47
+ </div>`
44
48
  ) as HTMLDivElement,
45
49
  preview = container.querySelector(
46
50
  '.jodit-symbols__preview'
@@ -53,7 +57,7 @@ export class symbols extends Plugin {
53
57
  const tr = jodit.c.element('tr');
54
58
 
55
59
  for (
56
- let j: number = 0;
60
+ let j = 0;
57
61
  j < this.countInRow && i < jodit.o.specialCharacters.length;
58
62
  j += 1, i += 1
59
63
  ) {
@@ -62,7 +66,6 @@ export class symbols extends Plugin {
62
66
  `<a
63
67
  data-index="${i}"
64
68
  data-index-j="${j}"
65
- href="javascript:void(0)"
66
69
  role="option"
67
70
  tabindex="-1"
68
71
  >${jodit.o.specialCharacters[i]}</a>`
@@ -90,7 +90,7 @@ export class xpath extends Plugin {
90
90
  title: string
91
91
  ): HTMLElement => {
92
92
  const item = this.j.c.fromHTML(
93
- `<span class="jodit-xpath__item"><a role="button" data-path="${path}" href="javascript:void(0)" title="${title}" tabindex="-1"'>${trim(
93
+ `<span class="jodit-xpath__item"><a role="button" data-path="${path}" title="${title}" tabindex="-1"'>${trim(
94
94
  name
95
95
  )}</a></span>`
96
96
  ) as HTMLLIElement;
@@ -27,7 +27,7 @@
27
27
 
28
28
  .jodit-container:not(.jodit_inline) {
29
29
  border: 1px solid var(--color-border);
30
- background-color: var(--color-background-default);
30
+ //background-color: var(--color-background-default);
31
31
  border-radius: var(--border-radius-default);
32
32
 
33
33
  .jodit-workplace {
package/src/types/ui.d.ts CHANGED
@@ -50,11 +50,19 @@ export interface IUIIconState {
50
50
  fill: string;
51
51
  }
52
52
 
53
+ export type ButtonStatus =
54
+ | 'initial'
55
+ | 'default'
56
+ | 'primary'
57
+ | 'secondary'
58
+ | 'success'
59
+ | 'danger';
60
+
53
61
  export interface IUIButtonState {
54
62
  size: 'tiny' | 'xsmall' | 'small' | 'middle' | 'large';
55
63
  name: string;
56
64
  value: string | number | boolean;
57
- status: string;
65
+ status: ButtonStatus;
58
66
  type: 'button' | 'submit';
59
67
  disabled: boolean;
60
68
  activated: boolean;