@progress/kendo-angular-editor 4.0.1-dev.202205191407 → 4.1.1-dev.202206141245
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/bundles/kendo-angular-editor.umd.js +1 -1
- package/common/font-size-item.interface.d.ts +2 -2
- package/esm2015/config/commands.js +1 -1
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/tools/colorpicker/editor-colorpicker.component.js +3 -1
- package/esm2015/tools/fontsize/editor-fontsize.component.js +20 -10
- package/fesm2015/kendo-angular-editor.js +25 -13
- package/package.json +5 -5
- package/tools/fontsize/editor-fontsize.component.d.ts +1 -0
|
@@ -10,10 +10,10 @@ export interface FontSizeItem {
|
|
|
10
10
|
* The value of the [`font-size`](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) CSS property.
|
|
11
11
|
* @example
|
|
12
12
|
* ```ts-no-run
|
|
13
|
-
* '
|
|
13
|
+
* '4px'
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
|
-
size: number;
|
|
16
|
+
size: number | string;
|
|
17
17
|
/**
|
|
18
18
|
* The text for the font size that will be displayed in the drop-down list.
|
|
19
19
|
* @example
|
|
@@ -12,7 +12,7 @@ const inlineCommand = {
|
|
|
12
12
|
cleanFormatting: (options) => cleanFormatting(options),
|
|
13
13
|
createLink: attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs.value, applyToWord: attrs.applyToWord }),
|
|
14
14
|
fontFamily: attrs => expandToWordWrap(applyInlineStyle, { style: 'font-family', value: attrs.value, applyToWord: attrs.applyToWord }),
|
|
15
|
-
fontSize: attrs => expandToWordWrap(applyInlineStyle, { style: 'font-size', value: attrs.value
|
|
15
|
+
fontSize: attrs => expandToWordWrap(applyInlineStyle, { style: 'font-size', value: attrs.value, applyToWord: attrs.applyToWord }),
|
|
16
16
|
insertFile: attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs, applyToWord: attrs.applyToWord }),
|
|
17
17
|
insertText: text => insertText(text),
|
|
18
18
|
italic: (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign(Object.assign({}, italic), { applyToWord })),
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-editor',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1655210679,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -71,7 +71,9 @@ export class EditorColorPickerComponent extends ToolBarToolComponent {
|
|
|
71
71
|
*/
|
|
72
72
|
handleValueChange(color) {
|
|
73
73
|
this.editor.exec(this.editorCommand, color);
|
|
74
|
-
this.
|
|
74
|
+
if (this.view === 'palette') {
|
|
75
|
+
this.editor.view.focus();
|
|
76
|
+
}
|
|
75
77
|
}
|
|
76
78
|
/**
|
|
77
79
|
* @hidden
|
|
@@ -38,21 +38,31 @@ export class EditorFontSizeComponent extends ToolBarToolComponent {
|
|
|
38
38
|
*/
|
|
39
39
|
this.valueChange = new EventEmitter();
|
|
40
40
|
this._data = [
|
|
41
|
-
{ text: '8px', size:
|
|
42
|
-
{ text: '10px', size:
|
|
43
|
-
{ text: '12px', size:
|
|
44
|
-
{ text: '14px', size:
|
|
45
|
-
{ text: '18px', size:
|
|
46
|
-
{ text: '24px', size:
|
|
47
|
-
{ text: '36px', size:
|
|
41
|
+
{ text: '8px', size: '8px' },
|
|
42
|
+
{ text: '10px', size: '10px' },
|
|
43
|
+
{ text: '12px', size: '12px' },
|
|
44
|
+
{ text: '14px', size: '14px' },
|
|
45
|
+
{ text: '18px', size: '18px' },
|
|
46
|
+
{ text: '24px', size: '24px' },
|
|
47
|
+
{ text: '36px', size: '36px' }
|
|
48
48
|
];
|
|
49
49
|
this.editor = providerService.editor;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Overrides the default font size list.
|
|
53
|
+
* Numeric values are treated as pixels.
|
|
53
54
|
*/
|
|
54
55
|
set data(sizes) {
|
|
55
|
-
|
|
56
|
+
let normalizedSizes;
|
|
57
|
+
if (sizes) {
|
|
58
|
+
normalizedSizes = sizes.map(s => {
|
|
59
|
+
if (typeof s.size === 'number') {
|
|
60
|
+
return Object.assign(Object.assign({}, s), { size: `${s.size}px` });
|
|
61
|
+
}
|
|
62
|
+
return s;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
this._data = normalizedSizes || this._data;
|
|
56
66
|
}
|
|
57
67
|
get data() {
|
|
58
68
|
return this._data;
|
|
@@ -73,7 +83,7 @@ export class EditorFontSizeComponent extends ToolBarToolComponent {
|
|
|
73
83
|
this.subs = this.editor.stateChange.subscribe(({ style }) => {
|
|
74
84
|
// remove units(px, em, rem...)
|
|
75
85
|
// string#match returns array
|
|
76
|
-
this.value =
|
|
86
|
+
this.value = getUniqueStyleValues(style.selected, 'font-size') || null;
|
|
77
87
|
this.disabled = style.disabled;
|
|
78
88
|
});
|
|
79
89
|
}
|
|
@@ -84,7 +94,7 @@ export class EditorFontSizeComponent extends ToolBarToolComponent {
|
|
|
84
94
|
if (isPresent(ev)) {
|
|
85
95
|
this.editor.exec('fontSize', ev);
|
|
86
96
|
this.editor.view.focus();
|
|
87
|
-
this.valueChange.emit(this.data.find(d => d.size ===
|
|
97
|
+
this.valueChange.emit(this.data.find(d => d.size === ev));
|
|
88
98
|
}
|
|
89
99
|
}
|
|
90
100
|
ngOnDestroy() {
|
|
@@ -35,7 +35,7 @@ const packageMetadata = {
|
|
|
35
35
|
name: '@progress/kendo-angular-editor',
|
|
36
36
|
productName: 'Kendo UI for Angular',
|
|
37
37
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
38
|
-
publishDate:
|
|
38
|
+
publishDate: 1655210679,
|
|
39
39
|
version: '',
|
|
40
40
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
41
41
|
};
|
|
@@ -179,7 +179,7 @@ const inlineCommand = {
|
|
|
179
179
|
cleanFormatting: (options) => cleanFormatting(options),
|
|
180
180
|
createLink: attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs.value, applyToWord: attrs.applyToWord }),
|
|
181
181
|
fontFamily: attrs => expandToWordWrap(applyInlineStyle, { style: 'font-family', value: attrs.value, applyToWord: attrs.applyToWord }),
|
|
182
|
-
fontSize: attrs => expandToWordWrap(applyInlineStyle, { style: 'font-size', value: attrs.value
|
|
182
|
+
fontSize: attrs => expandToWordWrap(applyInlineStyle, { style: 'font-size', value: attrs.value, applyToWord: attrs.applyToWord }),
|
|
183
183
|
insertFile: attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs, applyToWord: attrs.applyToWord }),
|
|
184
184
|
insertText: text => insertText(text),
|
|
185
185
|
italic: (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign(Object.assign({}, italic), { applyToWord })),
|
|
@@ -4521,21 +4521,31 @@ class EditorFontSizeComponent extends ToolBarToolComponent {
|
|
|
4521
4521
|
*/
|
|
4522
4522
|
this.valueChange = new EventEmitter();
|
|
4523
4523
|
this._data = [
|
|
4524
|
-
{ text: '8px', size:
|
|
4525
|
-
{ text: '10px', size:
|
|
4526
|
-
{ text: '12px', size:
|
|
4527
|
-
{ text: '14px', size:
|
|
4528
|
-
{ text: '18px', size:
|
|
4529
|
-
{ text: '24px', size:
|
|
4530
|
-
{ text: '36px', size:
|
|
4524
|
+
{ text: '8px', size: '8px' },
|
|
4525
|
+
{ text: '10px', size: '10px' },
|
|
4526
|
+
{ text: '12px', size: '12px' },
|
|
4527
|
+
{ text: '14px', size: '14px' },
|
|
4528
|
+
{ text: '18px', size: '18px' },
|
|
4529
|
+
{ text: '24px', size: '24px' },
|
|
4530
|
+
{ text: '36px', size: '36px' }
|
|
4531
4531
|
];
|
|
4532
4532
|
this.editor = providerService.editor;
|
|
4533
4533
|
}
|
|
4534
4534
|
/**
|
|
4535
4535
|
* Overrides the default font size list.
|
|
4536
|
+
* Numeric values are treated as pixels.
|
|
4536
4537
|
*/
|
|
4537
4538
|
set data(sizes) {
|
|
4538
|
-
|
|
4539
|
+
let normalizedSizes;
|
|
4540
|
+
if (sizes) {
|
|
4541
|
+
normalizedSizes = sizes.map(s => {
|
|
4542
|
+
if (typeof s.size === 'number') {
|
|
4543
|
+
return Object.assign(Object.assign({}, s), { size: `${s.size}px` });
|
|
4544
|
+
}
|
|
4545
|
+
return s;
|
|
4546
|
+
});
|
|
4547
|
+
}
|
|
4548
|
+
this._data = normalizedSizes || this._data;
|
|
4539
4549
|
}
|
|
4540
4550
|
get data() {
|
|
4541
4551
|
return this._data;
|
|
@@ -4556,7 +4566,7 @@ class EditorFontSizeComponent extends ToolBarToolComponent {
|
|
|
4556
4566
|
this.subs = this.editor.stateChange.subscribe(({ style }) => {
|
|
4557
4567
|
// remove units(px, em, rem...)
|
|
4558
4568
|
// string#match returns array
|
|
4559
|
-
this.value =
|
|
4569
|
+
this.value = getUniqueStyleValues(style.selected, 'font-size') || null;
|
|
4560
4570
|
this.disabled = style.disabled;
|
|
4561
4571
|
});
|
|
4562
4572
|
}
|
|
@@ -4567,7 +4577,7 @@ class EditorFontSizeComponent extends ToolBarToolComponent {
|
|
|
4567
4577
|
if (isPresent(ev)) {
|
|
4568
4578
|
this.editor.exec('fontSize', ev);
|
|
4569
4579
|
this.editor.view.focus();
|
|
4570
|
-
this.valueChange.emit(this.data.find(d => d.size ===
|
|
4580
|
+
this.valueChange.emit(this.data.find(d => d.size === ev));
|
|
4571
4581
|
}
|
|
4572
4582
|
}
|
|
4573
4583
|
ngOnDestroy() {
|
|
@@ -5001,7 +5011,9 @@ class EditorColorPickerComponent extends ToolBarToolComponent {
|
|
|
5001
5011
|
*/
|
|
5002
5012
|
handleValueChange(color) {
|
|
5003
5013
|
this.editor.exec(this.editorCommand, color);
|
|
5004
|
-
this.
|
|
5014
|
+
if (this.view === 'palette') {
|
|
5015
|
+
this.editor.view.focus();
|
|
5016
|
+
}
|
|
5005
5017
|
}
|
|
5006
5018
|
/**
|
|
5007
5019
|
* @hidden
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-editor",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1-dev.202206141245",
|
|
4
4
|
"description": "Kendo UI Editor for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
"fallbackTags": {
|
|
75
75
|
"dev": "latest"
|
|
76
76
|
},
|
|
77
|
-
"analyzeCommits": "@
|
|
77
|
+
"analyzeCommits": "@progress/semantic-prerelease/analyzeCommits",
|
|
78
78
|
"generateNotes": "@progress/kendo-angular-tasks/lib/generateNotes",
|
|
79
|
-
"getLastRelease": "@
|
|
80
|
-
"verifyConditions": "@
|
|
81
|
-
"verifyRelease": "@
|
|
79
|
+
"getLastRelease": "@progress/semantic-prerelease/getLastRelease",
|
|
80
|
+
"verifyConditions": "@progress/semantic-prerelease/verifyConditions",
|
|
81
|
+
"verifyRelease": "@progress/semantic-prerelease/verifyRelease"
|
|
82
82
|
},
|
|
83
83
|
"main": "bundles/kendo-angular-editor.umd.js",
|
|
84
84
|
"module": "fesm2015/kendo-angular-editor.js",
|
|
@@ -32,6 +32,7 @@ export declare class EditorFontSizeComponent extends ToolBarToolComponent {
|
|
|
32
32
|
tabindex: number;
|
|
33
33
|
/**
|
|
34
34
|
* Overrides the default font size list.
|
|
35
|
+
* Numeric values are treated as pixels.
|
|
35
36
|
*/
|
|
36
37
|
set data(sizes: FontSizeItem[]);
|
|
37
38
|
get data(): FontSizeItem[];
|