@progress/kendo-editor-common 1.10.0-dev.202307180758 → 1.10.0

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/dist/es/align.js CHANGED
@@ -10,12 +10,11 @@ export var alignBlocks = function (actions, commandName) { return function (stat
10
10
  tr.setMeta('commandName', commandName);
11
11
  blocks.forEach(function (node) {
12
12
  if (node.type.isTextblock) {
13
- var newAttrs = {};
14
13
  var action = actions.find(function (n) { return n.node === node.type.name; });
15
14
  if (action) {
16
- newAttrs = addStyles(node, action.style);
15
+ var newAttrs = addStyles(node, action.style);
16
+ changeTextBlock(tr, node, node.type, newAttrs);
17
17
  }
18
- changeTextBlock(tr, node, node.type, newAttrs);
19
18
  }
20
19
  });
21
20
  var result = tr.docChanged;
@@ -3,21 +3,26 @@ var style = function (name, value) {
3
3
  };
4
4
  export var alignLeftRules = [
5
5
  { node: 'paragraph', style: [style('text-align', 'left')] },
6
- { node: 'heading', style: [style('text-align', 'left')] }
6
+ { node: 'heading', style: [style('text-align', 'left')] },
7
+ { node: 'table_caption_external', style: [style('text-align', 'left')] }
7
8
  ];
8
9
  export var alignRightRules = [
9
10
  { node: 'paragraph', style: [style('text-align', 'right')] },
10
- { node: 'heading', style: [style('text-align', 'right')] }
11
+ { node: 'heading', style: [style('text-align', 'right')] },
12
+ { node: 'table_caption_external', style: [style('text-align', 'right')] }
11
13
  ];
12
14
  export var alignCenterRules = [
13
15
  { node: 'paragraph', style: [style('text-align', 'center')] },
14
- { node: 'heading', style: [style('text-align', 'center')] }
16
+ { node: 'heading', style: [style('text-align', 'center')] },
17
+ { node: 'table_caption_external', style: [style('text-align', 'center')] }
15
18
  ];
16
19
  export var alignJustifyRules = [
17
20
  { node: 'paragraph', style: [style('text-align', 'justify')] },
18
- { node: 'heading', style: [style('text-align', 'justify')] }
21
+ { node: 'heading', style: [style('text-align', 'justify')] },
22
+ { node: 'table_caption_external', style: [style('text-align', 'justify')] }
19
23
  ];
20
24
  export var alignRemoveRules = [
21
25
  { node: 'paragraph', style: [style('text-align', '')] },
22
- { node: 'heading', style: [style('text-align', '')] }
26
+ { node: 'heading', style: [style('text-align', '')] },
27
+ { node: 'table_caption_external', style: [style('text-align', '')] }
23
28
  ];
@@ -10,12 +10,11 @@ export const alignBlocks = (actions, commandName) => (state, dispatch) => {
10
10
  tr.setMeta('commandName', commandName);
11
11
  blocks.forEach(node => {
12
12
  if (node.type.isTextblock) {
13
- let newAttrs = {};
14
13
  const action = actions.find(n => n.node === node.type.name);
15
14
  if (action) {
16
- newAttrs = addStyles(node, action.style);
15
+ const newAttrs = addStyles(node, action.style);
16
+ changeTextBlock(tr, node, node.type, newAttrs);
17
17
  }
18
- changeTextBlock(tr, node, node.type, newAttrs);
19
18
  }
20
19
  });
21
20
  const result = tr.docChanged;
@@ -3,21 +3,26 @@ const style = (name, value) => {
3
3
  };
4
4
  export const alignLeftRules = [
5
5
  { node: 'paragraph', style: [style('text-align', 'left')] },
6
- { node: 'heading', style: [style('text-align', 'left')] }
6
+ { node: 'heading', style: [style('text-align', 'left')] },
7
+ { node: 'table_caption_external', style: [style('text-align', 'left')] }
7
8
  ];
8
9
  export const alignRightRules = [
9
10
  { node: 'paragraph', style: [style('text-align', 'right')] },
10
- { node: 'heading', style: [style('text-align', 'right')] }
11
+ { node: 'heading', style: [style('text-align', 'right')] },
12
+ { node: 'table_caption_external', style: [style('text-align', 'right')] }
11
13
  ];
12
14
  export const alignCenterRules = [
13
15
  { node: 'paragraph', style: [style('text-align', 'center')] },
14
- { node: 'heading', style: [style('text-align', 'center')] }
16
+ { node: 'heading', style: [style('text-align', 'center')] },
17
+ { node: 'table_caption_external', style: [style('text-align', 'center')] }
15
18
  ];
16
19
  export const alignJustifyRules = [
17
20
  { node: 'paragraph', style: [style('text-align', 'justify')] },
18
- { node: 'heading', style: [style('text-align', 'justify')] }
21
+ { node: 'heading', style: [style('text-align', 'justify')] },
22
+ { node: 'table_caption_external', style: [style('text-align', 'justify')] }
19
23
  ];
20
24
  export const alignRemoveRules = [
21
25
  { node: 'paragraph', style: [style('text-align', '')] },
22
- { node: 'heading', style: [style('text-align', '')] }
26
+ { node: 'heading', style: [style('text-align', '')] },
27
+ { node: 'table_caption_external', style: [style('text-align', '')] }
23
28
  ];
package/dist/npm/align.js CHANGED
@@ -13,12 +13,11 @@ var alignBlocks = function (actions, commandName) { return function (state, disp
13
13
  tr.setMeta('commandName', commandName);
14
14
  blocks.forEach(function (node) {
15
15
  if (node.type.isTextblock) {
16
- var newAttrs = {};
17
16
  var action = actions.find(function (n) { return n.node === node.type.name; });
18
17
  if (action) {
19
- newAttrs = blockNode_1.addStyles(node, action.style);
18
+ var newAttrs = blockNode_1.addStyles(node, action.style);
19
+ blockNode_1.changeTextBlock(tr, node, node.type, newAttrs);
20
20
  }
21
- blockNode_1.changeTextBlock(tr, node, node.type, newAttrs);
22
21
  }
23
22
  });
24
23
  var result = tr.docChanged;
@@ -6,21 +6,26 @@ var style = function (name, value) {
6
6
  };
7
7
  exports.alignLeftRules = [
8
8
  { node: 'paragraph', style: [style('text-align', 'left')] },
9
- { node: 'heading', style: [style('text-align', 'left')] }
9
+ { node: 'heading', style: [style('text-align', 'left')] },
10
+ { node: 'table_caption_external', style: [style('text-align', 'left')] }
10
11
  ];
11
12
  exports.alignRightRules = [
12
13
  { node: 'paragraph', style: [style('text-align', 'right')] },
13
- { node: 'heading', style: [style('text-align', 'right')] }
14
+ { node: 'heading', style: [style('text-align', 'right')] },
15
+ { node: 'table_caption_external', style: [style('text-align', 'right')] }
14
16
  ];
15
17
  exports.alignCenterRules = [
16
18
  { node: 'paragraph', style: [style('text-align', 'center')] },
17
- { node: 'heading', style: [style('text-align', 'center')] }
19
+ { node: 'heading', style: [style('text-align', 'center')] },
20
+ { node: 'table_caption_external', style: [style('text-align', 'center')] }
18
21
  ];
19
22
  exports.alignJustifyRules = [
20
23
  { node: 'paragraph', style: [style('text-align', 'justify')] },
21
- { node: 'heading', style: [style('text-align', 'justify')] }
24
+ { node: 'heading', style: [style('text-align', 'justify')] },
25
+ { node: 'table_caption_external', style: [style('text-align', 'justify')] }
22
26
  ];
23
27
  exports.alignRemoveRules = [
24
28
  { node: 'paragraph', style: [style('text-align', '')] },
25
- { node: 'heading', style: [style('text-align', '')] }
29
+ { node: 'heading', style: [style('text-align', '')] },
30
+ { node: 'table_caption_external', style: [style('text-align', '')] }
26
31
  ];