@ckeditor/ckeditor5-basic-styles 0.0.0-internal-20241206.0 → 0.0.0-internal-20251210.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/LICENSE.md +4 -4
- package/README.md +1 -1
- package/build/basic-styles.js +2 -2
- package/build/translations/be.js +1 -0
- package/ckeditor5-metadata.json +7 -7
- package/dist/index-content.css +2 -2
- package/dist/index-editor.css +2 -2
- package/dist/index.css +3 -3
- package/dist/index.css.map +1 -1
- package/dist/index.js +175 -186
- package/dist/index.js.map +1 -1
- package/dist/translations/af.d.ts +2 -2
- package/dist/translations/af.js +2 -2
- package/dist/translations/af.umd.js +2 -2
- package/dist/translations/ar.d.ts +2 -2
- package/dist/translations/ar.js +2 -2
- package/dist/translations/ar.umd.js +2 -2
- package/dist/translations/ast.d.ts +2 -2
- package/dist/translations/ast.js +2 -2
- package/dist/translations/ast.umd.js +2 -2
- package/dist/translations/az.d.ts +2 -2
- package/dist/translations/az.js +2 -2
- package/dist/translations/az.umd.js +2 -2
- package/dist/translations/be.d.ts +8 -0
- package/dist/translations/be.js +5 -0
- package/dist/translations/be.umd.js +11 -0
- package/dist/translations/bg.d.ts +2 -2
- package/dist/translations/bg.js +2 -2
- package/dist/translations/bg.umd.js +2 -2
- package/dist/translations/bn.d.ts +2 -2
- package/dist/translations/bn.js +2 -2
- package/dist/translations/bn.umd.js +2 -2
- package/dist/translations/bs.d.ts +2 -2
- package/dist/translations/bs.js +2 -2
- package/dist/translations/bs.umd.js +2 -2
- package/dist/translations/ca.d.ts +2 -2
- package/dist/translations/ca.js +2 -2
- package/dist/translations/ca.umd.js +2 -2
- package/dist/translations/cs.d.ts +2 -2
- package/dist/translations/cs.js +2 -2
- package/dist/translations/cs.umd.js +2 -2
- package/dist/translations/da.d.ts +2 -2
- package/dist/translations/da.js +2 -2
- package/dist/translations/da.umd.js +2 -2
- package/dist/translations/de-ch.d.ts +2 -2
- package/dist/translations/de-ch.js +2 -2
- package/dist/translations/de-ch.umd.js +2 -2
- package/dist/translations/de.d.ts +2 -2
- package/dist/translations/de.js +2 -2
- package/dist/translations/de.umd.js +2 -2
- package/dist/translations/el.d.ts +2 -2
- package/dist/translations/el.js +2 -2
- package/dist/translations/el.umd.js +2 -2
- package/dist/translations/en-au.d.ts +2 -2
- package/dist/translations/en-au.js +2 -2
- package/dist/translations/en-au.umd.js +2 -2
- package/dist/translations/en-gb.d.ts +2 -2
- package/dist/translations/en-gb.js +2 -2
- package/dist/translations/en-gb.umd.js +2 -2
- package/dist/translations/en.d.ts +2 -2
- package/dist/translations/en.js +2 -2
- package/dist/translations/en.umd.js +2 -2
- package/dist/translations/eo.d.ts +2 -2
- package/dist/translations/eo.js +2 -2
- package/dist/translations/eo.umd.js +2 -2
- package/dist/translations/es-co.d.ts +2 -2
- package/dist/translations/es-co.js +2 -2
- package/dist/translations/es-co.umd.js +2 -2
- package/dist/translations/es.d.ts +2 -2
- package/dist/translations/es.js +2 -2
- package/dist/translations/es.umd.js +2 -2
- package/dist/translations/et.d.ts +2 -2
- package/dist/translations/et.js +2 -2
- package/dist/translations/et.umd.js +2 -2
- package/dist/translations/eu.d.ts +2 -2
- package/dist/translations/eu.js +2 -2
- package/dist/translations/eu.umd.js +2 -2
- package/dist/translations/fa.d.ts +2 -2
- package/dist/translations/fa.js +2 -2
- package/dist/translations/fa.umd.js +2 -2
- package/dist/translations/fi.d.ts +2 -2
- package/dist/translations/fi.js +2 -2
- package/dist/translations/fi.umd.js +2 -2
- package/dist/translations/fr.d.ts +2 -2
- package/dist/translations/fr.js +2 -2
- package/dist/translations/fr.umd.js +2 -2
- package/dist/translations/gl.d.ts +2 -2
- package/dist/translations/gl.js +2 -2
- package/dist/translations/gl.umd.js +2 -2
- package/dist/translations/gu.d.ts +2 -2
- package/dist/translations/gu.js +2 -2
- package/dist/translations/gu.umd.js +2 -2
- package/dist/translations/he.d.ts +2 -2
- package/dist/translations/he.js +2 -2
- package/dist/translations/he.umd.js +2 -2
- package/dist/translations/hi.d.ts +2 -2
- package/dist/translations/hi.js +2 -2
- package/dist/translations/hi.umd.js +2 -2
- package/dist/translations/hr.d.ts +2 -2
- package/dist/translations/hr.js +2 -2
- package/dist/translations/hr.umd.js +2 -2
- package/dist/translations/hu.d.ts +2 -2
- package/dist/translations/hu.js +2 -2
- package/dist/translations/hu.umd.js +2 -2
- package/dist/translations/hy.d.ts +2 -2
- package/dist/translations/hy.js +2 -2
- package/dist/translations/hy.umd.js +2 -2
- package/dist/translations/id.d.ts +2 -2
- package/dist/translations/id.js +2 -2
- package/dist/translations/id.umd.js +2 -2
- package/dist/translations/it.d.ts +2 -2
- package/dist/translations/it.js +2 -2
- package/dist/translations/it.umd.js +2 -2
- package/dist/translations/ja.d.ts +2 -2
- package/dist/translations/ja.js +2 -2
- package/dist/translations/ja.umd.js +2 -2
- package/dist/translations/jv.d.ts +2 -2
- package/dist/translations/jv.js +2 -2
- package/dist/translations/jv.umd.js +2 -2
- package/dist/translations/kk.d.ts +2 -2
- package/dist/translations/kk.js +2 -2
- package/dist/translations/kk.umd.js +2 -2
- package/dist/translations/km.d.ts +2 -2
- package/dist/translations/km.js +2 -2
- package/dist/translations/km.umd.js +2 -2
- package/dist/translations/kn.d.ts +2 -2
- package/dist/translations/kn.js +2 -2
- package/dist/translations/kn.umd.js +2 -2
- package/dist/translations/ko.d.ts +2 -2
- package/dist/translations/ko.js +2 -2
- package/dist/translations/ko.umd.js +2 -2
- package/dist/translations/ku.d.ts +2 -2
- package/dist/translations/ku.js +2 -2
- package/dist/translations/ku.umd.js +2 -2
- package/dist/translations/lt.d.ts +2 -2
- package/dist/translations/lt.js +2 -2
- package/dist/translations/lt.umd.js +2 -2
- package/dist/translations/lv.d.ts +2 -2
- package/dist/translations/lv.js +2 -2
- package/dist/translations/lv.umd.js +2 -2
- package/dist/translations/ms.d.ts +2 -2
- package/dist/translations/ms.js +2 -2
- package/dist/translations/ms.umd.js +2 -2
- package/dist/translations/nb.d.ts +2 -2
- package/dist/translations/nb.js +2 -2
- package/dist/translations/nb.umd.js +2 -2
- package/dist/translations/ne.d.ts +2 -2
- package/dist/translations/ne.js +2 -2
- package/dist/translations/ne.umd.js +2 -2
- package/dist/translations/nl.d.ts +2 -2
- package/dist/translations/nl.js +2 -2
- package/dist/translations/nl.umd.js +2 -2
- package/dist/translations/no.d.ts +2 -2
- package/dist/translations/no.js +2 -2
- package/dist/translations/no.umd.js +2 -2
- package/dist/translations/oc.d.ts +2 -2
- package/dist/translations/oc.js +2 -2
- package/dist/translations/oc.umd.js +2 -2
- package/dist/translations/pl.d.ts +2 -2
- package/dist/translations/pl.js +2 -2
- package/dist/translations/pl.umd.js +2 -2
- package/dist/translations/pt-br.d.ts +2 -2
- package/dist/translations/pt-br.js +2 -2
- package/dist/translations/pt-br.umd.js +2 -2
- package/dist/translations/pt.d.ts +2 -2
- package/dist/translations/pt.js +2 -2
- package/dist/translations/pt.umd.js +2 -2
- package/dist/translations/ro.d.ts +2 -2
- package/dist/translations/ro.js +2 -2
- package/dist/translations/ro.umd.js +2 -2
- package/dist/translations/ru.d.ts +2 -2
- package/dist/translations/ru.js +2 -2
- package/dist/translations/ru.umd.js +2 -2
- package/dist/translations/si.d.ts +2 -2
- package/dist/translations/si.js +2 -2
- package/dist/translations/si.umd.js +2 -2
- package/dist/translations/sk.d.ts +2 -2
- package/dist/translations/sk.js +2 -2
- package/dist/translations/sk.umd.js +2 -2
- package/dist/translations/sl.d.ts +2 -2
- package/dist/translations/sl.js +2 -2
- package/dist/translations/sl.umd.js +2 -2
- package/dist/translations/sq.d.ts +2 -2
- package/dist/translations/sq.js +2 -2
- package/dist/translations/sq.umd.js +2 -2
- package/dist/translations/sr-latn.d.ts +2 -2
- package/dist/translations/sr-latn.js +2 -2
- package/dist/translations/sr-latn.umd.js +2 -2
- package/dist/translations/sr.d.ts +2 -2
- package/dist/translations/sr.js +2 -2
- package/dist/translations/sr.umd.js +2 -2
- package/dist/translations/sv.d.ts +2 -2
- package/dist/translations/sv.js +2 -2
- package/dist/translations/sv.umd.js +2 -2
- package/dist/translations/th.d.ts +2 -2
- package/dist/translations/th.js +2 -2
- package/dist/translations/th.umd.js +2 -2
- package/dist/translations/ti.d.ts +2 -2
- package/dist/translations/ti.js +2 -2
- package/dist/translations/ti.umd.js +2 -2
- package/dist/translations/tk.d.ts +2 -2
- package/dist/translations/tk.js +2 -2
- package/dist/translations/tk.umd.js +2 -2
- package/dist/translations/tr.d.ts +2 -2
- package/dist/translations/tr.js +2 -2
- package/dist/translations/tr.umd.js +2 -2
- package/dist/translations/tt.d.ts +2 -2
- package/dist/translations/tt.js +2 -2
- package/dist/translations/tt.umd.js +2 -2
- package/dist/translations/ug.d.ts +2 -2
- package/dist/translations/ug.js +2 -2
- package/dist/translations/ug.umd.js +2 -2
- package/dist/translations/uk.d.ts +2 -2
- package/dist/translations/uk.js +2 -2
- package/dist/translations/uk.umd.js +2 -2
- package/dist/translations/ur.d.ts +2 -2
- package/dist/translations/ur.js +2 -2
- package/dist/translations/ur.umd.js +2 -2
- package/dist/translations/uz.d.ts +2 -2
- package/dist/translations/uz.js +2 -2
- package/dist/translations/uz.umd.js +2 -2
- package/dist/translations/vi.d.ts +2 -2
- package/dist/translations/vi.js +2 -2
- package/dist/translations/vi.umd.js +2 -2
- package/dist/translations/zh-cn.d.ts +2 -2
- package/dist/translations/zh-cn.js +2 -2
- package/dist/translations/zh-cn.umd.js +2 -2
- package/dist/translations/zh.d.ts +2 -2
- package/dist/translations/zh.js +2 -2
- package/dist/translations/zh.umd.js +2 -2
- package/lang/translations/af.po +1 -1
- package/lang/translations/ar.po +1 -1
- package/lang/translations/ast.po +1 -1
- package/lang/translations/az.po +1 -1
- package/lang/translations/be.po +60 -0
- package/lang/translations/bg.po +1 -1
- package/lang/translations/bn.po +1 -1
- package/lang/translations/bs.po +1 -1
- package/lang/translations/ca.po +1 -1
- package/lang/translations/cs.po +1 -1
- package/lang/translations/da.po +1 -1
- package/lang/translations/de-ch.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +1 -1
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/en-gb.po +1 -1
- package/lang/translations/en.po +1 -1
- package/lang/translations/eo.po +1 -1
- package/lang/translations/es-co.po +1 -1
- package/lang/translations/es.po +1 -1
- package/lang/translations/et.po +1 -1
- package/lang/translations/eu.po +1 -1
- package/lang/translations/fa.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/gu.po +1 -1
- package/lang/translations/he.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/hy.po +1 -1
- package/lang/translations/id.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/jv.po +1 -1
- package/lang/translations/kk.po +1 -1
- package/lang/translations/km.po +1 -1
- package/lang/translations/kn.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/ku.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/ms.po +1 -1
- package/lang/translations/nb.po +1 -1
- package/lang/translations/ne.po +1 -1
- package/lang/translations/nl.po +1 -1
- package/lang/translations/no.po +1 -1
- package/lang/translations/oc.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/pt.po +1 -1
- package/lang/translations/ro.po +1 -1
- package/lang/translations/ru.po +1 -1
- package/lang/translations/si.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sl.po +1 -1
- package/lang/translations/sq.po +1 -1
- package/lang/translations/sr-latn.po +1 -1
- package/lang/translations/sr.po +1 -1
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/ti.po +1 -1
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/tt.po +1 -1
- package/lang/translations/ug.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/ur.po +1 -1
- package/lang/translations/uz.po +1 -1
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/lang/translations/zh.po +1 -1
- package/package.json +14 -9
- package/src/attributecommand.d.ts +7 -7
- package/src/attributecommand.js +10 -6
- package/src/augmentation.d.ts +1 -1
- package/src/augmentation.js +1 -1
- package/src/bold/boldediting.d.ts +2 -2
- package/src/bold/boldediting.js +3 -3
- package/src/bold/boldui.d.ts +2 -2
- package/src/bold/boldui.js +5 -4
- package/src/bold.d.ts +4 -4
- package/src/bold.js +4 -4
- package/src/code/codeediting.d.ts +2 -2
- package/src/code/codeediting.js +4 -9
- package/src/code/codeui.d.ts +2 -2
- package/src/code/codeui.js +4 -4
- package/src/code.d.ts +4 -4
- package/src/code.js +4 -4
- package/src/index.d.ts +24 -23
- package/src/index.js +24 -23
- package/src/italic/italicediting.d.ts +2 -2
- package/src/italic/italicediting.js +3 -3
- package/src/italic/italicui.d.ts +2 -2
- package/src/italic/italicui.js +4 -4
- package/src/italic.d.ts +4 -4
- package/src/italic.js +4 -4
- package/src/strikethrough/strikethroughediting.d.ts +2 -2
- package/src/strikethrough/strikethroughediting.js +3 -3
- package/src/strikethrough/strikethroughui.d.ts +2 -2
- package/src/strikethrough/strikethroughui.js +4 -4
- package/src/strikethrough.d.ts +4 -4
- package/src/strikethrough.js +4 -4
- package/src/subscript/subscriptediting.d.ts +2 -2
- package/src/subscript/subscriptediting.js +3 -3
- package/src/subscript/subscriptui.d.ts +2 -2
- package/src/subscript/subscriptui.js +4 -4
- package/src/subscript.d.ts +4 -4
- package/src/subscript.js +4 -4
- package/src/superscript/superscriptediting.d.ts +2 -2
- package/src/superscript/superscriptediting.js +3 -3
- package/src/superscript/superscriptui.d.ts +2 -2
- package/src/superscript/superscriptui.js +4 -4
- package/src/superscript.d.ts +4 -4
- package/src/superscript.js +4 -4
- package/src/underline/underlineediting.d.ts +2 -2
- package/src/underline/underlineediting.js +3 -3
- package/src/underline/underlineui.d.ts +2 -2
- package/src/underline/underlineui.js +4 -4
- package/src/underline.d.ts +4 -4
- package/src/underline.js +4 -4
- package/src/utils.d.ts +3 -1
- package/src/utils.js +3 -1
- package/theme/code.css +1 -1
- package/theme/icons/code.svg +0 -1
- package/theme/icons/italic.svg +0 -1
- package/theme/icons/strikethrough.svg +0 -1
- package/theme/icons/subscript.svg +0 -1
- package/theme/icons/superscript.svg +0 -1
- package/theme/icons/underline.svg +0 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
import { Command, Plugin
|
|
5
|
+
import { Command, Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';
|
|
6
|
+
import { IconBold, IconCode, IconItalic, IconStrikethrough, IconSubscript, IconSuperscript, IconUnderline } from '@ckeditor/ckeditor5-icons/dist/index.js';
|
|
6
7
|
import { MenuBarMenuListItemButtonView, ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';
|
|
7
8
|
import { TwoStepCaretMovement, inlineHighlight } from '@ckeditor/ckeditor5-typing/dist/index.js';
|
|
8
9
|
|
|
@@ -10,46 +11,49 @@ import { TwoStepCaretMovement, inlineHighlight } from '@ckeditor/ckeditor5-typin
|
|
|
10
11
|
* An extension of the base {@link module:core/command~Command} class, which provides utilities for a command
|
|
11
12
|
* that toggles a single attribute on a text or an element.
|
|
12
13
|
*
|
|
13
|
-
* `AttributeCommand` uses {@link module:engine/model/document~
|
|
14
|
+
* `AttributeCommand` uses {@link module:engine/model/document~ModelDocument#selection}
|
|
14
15
|
* to decide which nodes (if any) should be changed, and applies or removes the attribute from them.
|
|
15
16
|
*
|
|
16
17
|
* The command checks the {@link module:engine/model/model~Model#schema} to decide if it can be enabled
|
|
17
18
|
* for the current selection and to which nodes the attribute can be applied.
|
|
18
19
|
*/ class AttributeCommand extends Command {
|
|
19
20
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
* The attribute that will be set by the command.
|
|
22
|
+
*/ attributeKey;
|
|
23
|
+
/**
|
|
24
|
+
* @param attributeKey Attribute that will be set by the command.
|
|
25
|
+
*/ constructor(editor, attributeKey){
|
|
22
26
|
super(editor);
|
|
23
27
|
this.attributeKey = attributeKey;
|
|
24
28
|
}
|
|
25
29
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
* Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.
|
|
31
|
+
*/ refresh() {
|
|
28
32
|
const model = this.editor.model;
|
|
29
33
|
const doc = model.document;
|
|
30
34
|
this.value = this._getValueFromFirstAllowedNode();
|
|
31
35
|
this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);
|
|
32
36
|
}
|
|
33
37
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
38
|
+
* Executes the command – applies the attribute to the selection or removes it from the selection.
|
|
39
|
+
*
|
|
40
|
+
* If the command is active (`value == true`), it will remove attributes. Otherwise, it will set attributes.
|
|
41
|
+
*
|
|
42
|
+
* The execution result differs, depending on the {@link module:engine/model/document~ModelDocument#selection}:
|
|
43
|
+
*
|
|
44
|
+
* * If the selection is on a range, the command applies the attribute to all nodes in that range
|
|
45
|
+
* (if they are allowed to have this attribute by the {@link module:engine/model/schema~ModelSchema schema}).
|
|
46
|
+
* * If the selection is collapsed in a non-empty node, the command applies the attribute to the
|
|
47
|
+
* {@link module:engine/model/document~ModelDocument#selection} itself (note that typed characters copy attributes from the selection).
|
|
48
|
+
* * If the selection is collapsed in an empty node, the command applies the attribute to the parent node of the selection (note
|
|
49
|
+
* that the selection inherits all attributes from a node if it is in an empty node).
|
|
50
|
+
*
|
|
51
|
+
* @fires execute
|
|
52
|
+
* @param options Command options.
|
|
53
|
+
* @param options.forceValue If set, it will force the command behavior. If `true`,
|
|
54
|
+
* the command will apply the attribute, otherwise the command will remove the attribute.
|
|
55
|
+
* If not set, the command will look for its current value to decide what it should do.
|
|
56
|
+
*/ execute(options = {}) {
|
|
53
57
|
const model = this.editor.model;
|
|
54
58
|
const doc = model.document;
|
|
55
59
|
const selection = doc.selection;
|
|
@@ -74,11 +78,11 @@ import { TwoStepCaretMovement, inlineHighlight } from '@ckeditor/ckeditor5-typin
|
|
|
74
78
|
});
|
|
75
79
|
}
|
|
76
80
|
/**
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
* Checks the attribute value of the first node in the selection that allows the attribute.
|
|
82
|
+
* For the collapsed selection returns the selection attribute.
|
|
83
|
+
*
|
|
84
|
+
* @returns The attribute value.
|
|
85
|
+
*/ _getValueFromFirstAllowedNode() {
|
|
82
86
|
const model = this.editor.model;
|
|
83
87
|
const schema = model.schema;
|
|
84
88
|
const selection = model.document.selection;
|
|
@@ -104,18 +108,18 @@ const BOLD$1 = 'bold';
|
|
|
104
108
|
* as a `<strong>` element.
|
|
105
109
|
*/ class BoldEditing extends Plugin {
|
|
106
110
|
/**
|
|
107
|
-
|
|
108
|
-
|
|
111
|
+
* @inheritDoc
|
|
112
|
+
*/ static get pluginName() {
|
|
109
113
|
return 'BoldEditing';
|
|
110
114
|
}
|
|
111
115
|
/**
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
* @inheritDoc
|
|
117
|
+
*/ static get isOfficialPlugin() {
|
|
114
118
|
return true;
|
|
115
119
|
}
|
|
116
120
|
/**
|
|
117
|
-
|
|
118
|
-
|
|
121
|
+
* @inheritDoc
|
|
122
|
+
*/ init() {
|
|
119
123
|
const editor = this.editor;
|
|
120
124
|
const t = this.editor.t;
|
|
121
125
|
// Allow bold attribute on text nodes.
|
|
@@ -168,6 +172,8 @@ const BOLD$1 = 'bold';
|
|
|
168
172
|
|
|
169
173
|
/**
|
|
170
174
|
* Returns a function that creates a (toolbar or menu bar) button for a basic style feature.
|
|
175
|
+
*
|
|
176
|
+
* @internal
|
|
171
177
|
*/ function getButtonCreator({ editor, commandName, plugin, icon, label, keystroke }) {
|
|
172
178
|
return (ButtonClass)=>{
|
|
173
179
|
const command = editor.commands.get(commandName);
|
|
@@ -203,25 +209,25 @@ const BOLD = 'bold';
|
|
|
203
209
|
* The bold UI feature. It introduces the Bold button.
|
|
204
210
|
*/ class BoldUI extends Plugin {
|
|
205
211
|
/**
|
|
206
|
-
|
|
207
|
-
|
|
212
|
+
* @inheritDoc
|
|
213
|
+
*/ static get pluginName() {
|
|
208
214
|
return 'BoldUI';
|
|
209
215
|
}
|
|
210
216
|
/**
|
|
211
|
-
|
|
212
|
-
|
|
217
|
+
* @inheritDoc
|
|
218
|
+
*/ static get isOfficialPlugin() {
|
|
213
219
|
return true;
|
|
214
220
|
}
|
|
215
221
|
/**
|
|
216
|
-
|
|
217
|
-
|
|
222
|
+
* @inheritDoc
|
|
223
|
+
*/ init() {
|
|
218
224
|
const editor = this.editor;
|
|
219
225
|
const t = editor.locale.t;
|
|
220
226
|
const createButton = getButtonCreator({
|
|
221
227
|
editor,
|
|
222
228
|
commandName: BOLD,
|
|
223
229
|
plugin: this,
|
|
224
|
-
icon:
|
|
230
|
+
icon: IconBold,
|
|
225
231
|
label: t('Bold'),
|
|
226
232
|
keystroke: 'CTRL+B'
|
|
227
233
|
});
|
|
@@ -241,21 +247,21 @@ const BOLD = 'bold';
|
|
|
241
247
|
* and {@link module:basic-styles/bold/boldui~BoldUI bold UI feature}.
|
|
242
248
|
*/ class Bold extends Plugin {
|
|
243
249
|
/**
|
|
244
|
-
|
|
245
|
-
|
|
250
|
+
* @inheritDoc
|
|
251
|
+
*/ static get requires() {
|
|
246
252
|
return [
|
|
247
253
|
BoldEditing,
|
|
248
254
|
BoldUI
|
|
249
255
|
];
|
|
250
256
|
}
|
|
251
257
|
/**
|
|
252
|
-
|
|
253
|
-
|
|
258
|
+
* @inheritDoc
|
|
259
|
+
*/ static get pluginName() {
|
|
254
260
|
return 'Bold';
|
|
255
261
|
}
|
|
256
262
|
/**
|
|
257
|
-
|
|
258
|
-
|
|
263
|
+
* @inheritDoc
|
|
264
|
+
*/ static get isOfficialPlugin() {
|
|
259
265
|
return true;
|
|
260
266
|
}
|
|
261
267
|
}
|
|
@@ -269,25 +275,25 @@ const HIGHLIGHT_CLASS = 'ck-code_selected';
|
|
|
269
275
|
* as a `<code>` element.
|
|
270
276
|
*/ class CodeEditing extends Plugin {
|
|
271
277
|
/**
|
|
272
|
-
|
|
273
|
-
|
|
278
|
+
* @inheritDoc
|
|
279
|
+
*/ static get pluginName() {
|
|
274
280
|
return 'CodeEditing';
|
|
275
281
|
}
|
|
276
282
|
/**
|
|
277
|
-
|
|
278
|
-
|
|
283
|
+
* @inheritDoc
|
|
284
|
+
*/ static get isOfficialPlugin() {
|
|
279
285
|
return true;
|
|
280
286
|
}
|
|
281
287
|
/**
|
|
282
|
-
|
|
283
|
-
|
|
288
|
+
* @inheritDoc
|
|
289
|
+
*/ static get requires() {
|
|
284
290
|
return [
|
|
285
291
|
TwoStepCaretMovement
|
|
286
292
|
];
|
|
287
293
|
}
|
|
288
294
|
/**
|
|
289
|
-
|
|
290
|
-
|
|
295
|
+
* @inheritDoc
|
|
296
|
+
*/ init() {
|
|
291
297
|
const editor = this.editor;
|
|
292
298
|
const t = this.editor.t;
|
|
293
299
|
// Allow code attribute on text nodes.
|
|
@@ -300,12 +306,7 @@ const HIGHLIGHT_CLASS = 'ck-code_selected';
|
|
|
300
306
|
});
|
|
301
307
|
editor.conversion.attributeToElement({
|
|
302
308
|
model: CODE$1,
|
|
303
|
-
view: 'code'
|
|
304
|
-
upcastAlso: {
|
|
305
|
-
styles: {
|
|
306
|
-
'word-wrap': 'break-word'
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
+
view: 'code'
|
|
309
310
|
});
|
|
310
311
|
// Create code command.
|
|
311
312
|
editor.commands.add(CODE$1, new AttributeCommand(editor, CODE$1));
|
|
@@ -334,32 +335,30 @@ const HIGHLIGHT_CLASS = 'ck-code_selected';
|
|
|
334
335
|
}
|
|
335
336
|
}
|
|
336
337
|
|
|
337
|
-
var codeIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m12.5 5.7 5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1zm-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1z\"/></svg>";
|
|
338
|
-
|
|
339
338
|
const CODE = 'code';
|
|
340
339
|
/**
|
|
341
340
|
* The code UI feature. It introduces the Code button.
|
|
342
341
|
*/ class CodeUI extends Plugin {
|
|
343
342
|
/**
|
|
344
|
-
|
|
345
|
-
|
|
343
|
+
* @inheritDoc
|
|
344
|
+
*/ static get pluginName() {
|
|
346
345
|
return 'CodeUI';
|
|
347
346
|
}
|
|
348
347
|
/**
|
|
349
|
-
|
|
350
|
-
|
|
348
|
+
* @inheritDoc
|
|
349
|
+
*/ static get isOfficialPlugin() {
|
|
351
350
|
return true;
|
|
352
351
|
}
|
|
353
352
|
/**
|
|
354
|
-
|
|
355
|
-
|
|
353
|
+
* @inheritDoc
|
|
354
|
+
*/ init() {
|
|
356
355
|
const editor = this.editor;
|
|
357
356
|
const t = editor.locale.t;
|
|
358
357
|
const createButton = getButtonCreator({
|
|
359
358
|
editor,
|
|
360
359
|
commandName: CODE,
|
|
361
360
|
plugin: this,
|
|
362
|
-
icon:
|
|
361
|
+
icon: IconCode,
|
|
363
362
|
label: t('Code')
|
|
364
363
|
});
|
|
365
364
|
// Add code button to feature components.
|
|
@@ -378,21 +377,21 @@ const CODE = 'code';
|
|
|
378
377
|
* and {@link module:basic-styles/code/codeui~CodeUI code UI feature}.
|
|
379
378
|
*/ class Code extends Plugin {
|
|
380
379
|
/**
|
|
381
|
-
|
|
382
|
-
|
|
380
|
+
* @inheritDoc
|
|
381
|
+
*/ static get requires() {
|
|
383
382
|
return [
|
|
384
383
|
CodeEditing,
|
|
385
384
|
CodeUI
|
|
386
385
|
];
|
|
387
386
|
}
|
|
388
387
|
/**
|
|
389
|
-
|
|
390
|
-
|
|
388
|
+
* @inheritDoc
|
|
389
|
+
*/ static get pluginName() {
|
|
391
390
|
return 'Code';
|
|
392
391
|
}
|
|
393
392
|
/**
|
|
394
|
-
|
|
395
|
-
|
|
393
|
+
* @inheritDoc
|
|
394
|
+
*/ static get isOfficialPlugin() {
|
|
396
395
|
return true;
|
|
397
396
|
}
|
|
398
397
|
}
|
|
@@ -405,18 +404,18 @@ const ITALIC$1 = 'italic';
|
|
|
405
404
|
* which renders to the view as an `<i>` element.
|
|
406
405
|
*/ class ItalicEditing extends Plugin {
|
|
407
406
|
/**
|
|
408
|
-
|
|
409
|
-
|
|
407
|
+
* @inheritDoc
|
|
408
|
+
*/ static get pluginName() {
|
|
410
409
|
return 'ItalicEditing';
|
|
411
410
|
}
|
|
412
411
|
/**
|
|
413
|
-
|
|
414
|
-
|
|
412
|
+
* @inheritDoc
|
|
413
|
+
*/ static get isOfficialPlugin() {
|
|
415
414
|
return true;
|
|
416
415
|
}
|
|
417
416
|
/**
|
|
418
|
-
|
|
419
|
-
|
|
417
|
+
* @inheritDoc
|
|
418
|
+
*/ init() {
|
|
420
419
|
const editor = this.editor;
|
|
421
420
|
const t = this.editor.t;
|
|
422
421
|
// Allow italic attribute on text nodes.
|
|
@@ -455,32 +454,30 @@ const ITALIC$1 = 'italic';
|
|
|
455
454
|
}
|
|
456
455
|
}
|
|
457
456
|
|
|
458
|
-
var italicIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z\"/></svg>";
|
|
459
|
-
|
|
460
457
|
const ITALIC = 'italic';
|
|
461
458
|
/**
|
|
462
459
|
* The italic UI feature. It introduces the Italic button.
|
|
463
460
|
*/ class ItalicUI extends Plugin {
|
|
464
461
|
/**
|
|
465
|
-
|
|
466
|
-
|
|
462
|
+
* @inheritDoc
|
|
463
|
+
*/ static get pluginName() {
|
|
467
464
|
return 'ItalicUI';
|
|
468
465
|
}
|
|
469
466
|
/**
|
|
470
|
-
|
|
471
|
-
|
|
467
|
+
* @inheritDoc
|
|
468
|
+
*/ static get isOfficialPlugin() {
|
|
472
469
|
return true;
|
|
473
470
|
}
|
|
474
471
|
/**
|
|
475
|
-
|
|
476
|
-
|
|
472
|
+
* @inheritDoc
|
|
473
|
+
*/ init() {
|
|
477
474
|
const editor = this.editor;
|
|
478
475
|
const t = editor.locale.t;
|
|
479
476
|
const createButton = getButtonCreator({
|
|
480
477
|
editor,
|
|
481
478
|
commandName: ITALIC,
|
|
482
479
|
plugin: this,
|
|
483
|
-
icon:
|
|
480
|
+
icon: IconItalic,
|
|
484
481
|
keystroke: 'CTRL+I',
|
|
485
482
|
label: t('Italic')
|
|
486
483
|
});
|
|
@@ -500,21 +497,21 @@ const ITALIC = 'italic';
|
|
|
500
497
|
* {@link module:basic-styles/italic/italicui~ItalicUI} plugins.
|
|
501
498
|
*/ class Italic extends Plugin {
|
|
502
499
|
/**
|
|
503
|
-
|
|
504
|
-
|
|
500
|
+
* @inheritDoc
|
|
501
|
+
*/ static get requires() {
|
|
505
502
|
return [
|
|
506
503
|
ItalicEditing,
|
|
507
504
|
ItalicUI
|
|
508
505
|
];
|
|
509
506
|
}
|
|
510
507
|
/**
|
|
511
|
-
|
|
512
|
-
|
|
508
|
+
* @inheritDoc
|
|
509
|
+
*/ static get pluginName() {
|
|
513
510
|
return 'Italic';
|
|
514
511
|
}
|
|
515
512
|
/**
|
|
516
|
-
|
|
517
|
-
|
|
513
|
+
* @inheritDoc
|
|
514
|
+
*/ static get isOfficialPlugin() {
|
|
518
515
|
return true;
|
|
519
516
|
}
|
|
520
517
|
}
|
|
@@ -528,18 +525,18 @@ const STRIKETHROUGH$1 = 'strikethrough';
|
|
|
528
525
|
* as a `<s>` element.
|
|
529
526
|
*/ class StrikethroughEditing extends Plugin {
|
|
530
527
|
/**
|
|
531
|
-
|
|
532
|
-
|
|
528
|
+
* @inheritDoc
|
|
529
|
+
*/ static get pluginName() {
|
|
533
530
|
return 'StrikethroughEditing';
|
|
534
531
|
}
|
|
535
532
|
/**
|
|
536
|
-
|
|
537
|
-
|
|
533
|
+
* @inheritDoc
|
|
534
|
+
*/ static get isOfficialPlugin() {
|
|
538
535
|
return true;
|
|
539
536
|
}
|
|
540
537
|
/**
|
|
541
|
-
|
|
542
|
-
|
|
538
|
+
* @inheritDoc
|
|
539
|
+
*/ init() {
|
|
543
540
|
const editor = this.editor;
|
|
544
541
|
const t = this.editor.t;
|
|
545
542
|
// Allow strikethrough attribute on text nodes.
|
|
@@ -579,32 +576,30 @@ const STRIKETHROUGH$1 = 'strikethrough';
|
|
|
579
576
|
}
|
|
580
577
|
}
|
|
581
578
|
|
|
582
|
-
var strikethroughIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6zM6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z\"/><path d=\"M3 10.5V9h14v1.5z\"/></svg>";
|
|
583
|
-
|
|
584
579
|
const STRIKETHROUGH = 'strikethrough';
|
|
585
580
|
/**
|
|
586
581
|
* The strikethrough UI feature. It introduces the Strikethrough button.
|
|
587
582
|
*/ class StrikethroughUI extends Plugin {
|
|
588
583
|
/**
|
|
589
|
-
|
|
590
|
-
|
|
584
|
+
* @inheritDoc
|
|
585
|
+
*/ static get pluginName() {
|
|
591
586
|
return 'StrikethroughUI';
|
|
592
587
|
}
|
|
593
588
|
/**
|
|
594
|
-
|
|
595
|
-
|
|
589
|
+
* @inheritDoc
|
|
590
|
+
*/ static get isOfficialPlugin() {
|
|
596
591
|
return true;
|
|
597
592
|
}
|
|
598
593
|
/**
|
|
599
|
-
|
|
600
|
-
|
|
594
|
+
* @inheritDoc
|
|
595
|
+
*/ init() {
|
|
601
596
|
const editor = this.editor;
|
|
602
597
|
const t = editor.locale.t;
|
|
603
598
|
const createButton = getButtonCreator({
|
|
604
599
|
editor,
|
|
605
600
|
commandName: STRIKETHROUGH,
|
|
606
601
|
plugin: this,
|
|
607
|
-
icon:
|
|
602
|
+
icon: IconStrikethrough,
|
|
608
603
|
keystroke: 'CTRL+SHIFT+X',
|
|
609
604
|
label: t('Strikethrough')
|
|
610
605
|
});
|
|
@@ -624,21 +619,21 @@ const STRIKETHROUGH = 'strikethrough';
|
|
|
624
619
|
* {@link module:basic-styles/strikethrough/strikethroughui~StrikethroughUI} plugins.
|
|
625
620
|
*/ class Strikethrough extends Plugin {
|
|
626
621
|
/**
|
|
627
|
-
|
|
628
|
-
|
|
622
|
+
* @inheritDoc
|
|
623
|
+
*/ static get requires() {
|
|
629
624
|
return [
|
|
630
625
|
StrikethroughEditing,
|
|
631
626
|
StrikethroughUI
|
|
632
627
|
];
|
|
633
628
|
}
|
|
634
629
|
/**
|
|
635
|
-
|
|
636
|
-
|
|
630
|
+
* @inheritDoc
|
|
631
|
+
*/ static get pluginName() {
|
|
637
632
|
return 'Strikethrough';
|
|
638
633
|
}
|
|
639
634
|
/**
|
|
640
|
-
|
|
641
|
-
|
|
635
|
+
* @inheritDoc
|
|
636
|
+
*/ static get isOfficialPlugin() {
|
|
642
637
|
return true;
|
|
643
638
|
}
|
|
644
639
|
}
|
|
@@ -651,18 +646,18 @@ const SUBSCRIPT$1 = 'subscript';
|
|
|
651
646
|
* as a `<sub>` element.
|
|
652
647
|
*/ class SubscriptEditing extends Plugin {
|
|
653
648
|
/**
|
|
654
|
-
|
|
655
|
-
|
|
649
|
+
* @inheritDoc
|
|
650
|
+
*/ static get pluginName() {
|
|
656
651
|
return 'SubscriptEditing';
|
|
657
652
|
}
|
|
658
653
|
/**
|
|
659
|
-
|
|
660
|
-
|
|
654
|
+
* @inheritDoc
|
|
655
|
+
*/ static get isOfficialPlugin() {
|
|
661
656
|
return true;
|
|
662
657
|
}
|
|
663
658
|
/**
|
|
664
|
-
|
|
665
|
-
|
|
659
|
+
* @inheritDoc
|
|
660
|
+
*/ init() {
|
|
666
661
|
const editor = this.editor;
|
|
667
662
|
// Allow sub attribute on text nodes.
|
|
668
663
|
editor.model.schema.extend('$text', {
|
|
@@ -689,32 +684,30 @@ const SUBSCRIPT$1 = 'subscript';
|
|
|
689
684
|
}
|
|
690
685
|
}
|
|
691
686
|
|
|
692
|
-
var subscriptIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m7.03 10.349 3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82zm8.147 7.829h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309z\"/></svg>";
|
|
693
|
-
|
|
694
687
|
const SUBSCRIPT = 'subscript';
|
|
695
688
|
/**
|
|
696
689
|
* The subscript UI feature. It introduces the Subscript button.
|
|
697
690
|
*/ class SubscriptUI extends Plugin {
|
|
698
691
|
/**
|
|
699
|
-
|
|
700
|
-
|
|
692
|
+
* @inheritDoc
|
|
693
|
+
*/ static get pluginName() {
|
|
701
694
|
return 'SubscriptUI';
|
|
702
695
|
}
|
|
703
696
|
/**
|
|
704
|
-
|
|
705
|
-
|
|
697
|
+
* @inheritDoc
|
|
698
|
+
*/ static get isOfficialPlugin() {
|
|
706
699
|
return true;
|
|
707
700
|
}
|
|
708
701
|
/**
|
|
709
|
-
|
|
710
|
-
|
|
702
|
+
* @inheritDoc
|
|
703
|
+
*/ init() {
|
|
711
704
|
const editor = this.editor;
|
|
712
705
|
const t = editor.locale.t;
|
|
713
706
|
const createButton = getButtonCreator({
|
|
714
707
|
editor,
|
|
715
708
|
commandName: SUBSCRIPT,
|
|
716
709
|
plugin: this,
|
|
717
|
-
icon:
|
|
710
|
+
icon: IconSubscript,
|
|
718
711
|
label: t('Subscript')
|
|
719
712
|
});
|
|
720
713
|
// Add subscript button to feature components.
|
|
@@ -730,21 +723,21 @@ const SUBSCRIPT = 'subscript';
|
|
|
730
723
|
* {@link module:basic-styles/subscript/subscriptui~SubscriptUI} plugins.
|
|
731
724
|
*/ class Subscript extends Plugin {
|
|
732
725
|
/**
|
|
733
|
-
|
|
734
|
-
|
|
726
|
+
* @inheritDoc
|
|
727
|
+
*/ static get requires() {
|
|
735
728
|
return [
|
|
736
729
|
SubscriptEditing,
|
|
737
730
|
SubscriptUI
|
|
738
731
|
];
|
|
739
732
|
}
|
|
740
733
|
/**
|
|
741
|
-
|
|
742
|
-
|
|
734
|
+
* @inheritDoc
|
|
735
|
+
*/ static get pluginName() {
|
|
743
736
|
return 'Subscript';
|
|
744
737
|
}
|
|
745
738
|
/**
|
|
746
|
-
|
|
747
|
-
|
|
739
|
+
* @inheritDoc
|
|
740
|
+
*/ static get isOfficialPlugin() {
|
|
748
741
|
return true;
|
|
749
742
|
}
|
|
750
743
|
}
|
|
@@ -757,18 +750,18 @@ const SUPERSCRIPT$1 = 'superscript';
|
|
|
757
750
|
* as a `<super>` element.
|
|
758
751
|
*/ class SuperscriptEditing extends Plugin {
|
|
759
752
|
/**
|
|
760
|
-
|
|
761
|
-
|
|
753
|
+
* @inheritDoc
|
|
754
|
+
*/ static get pluginName() {
|
|
762
755
|
return 'SuperscriptEditing';
|
|
763
756
|
}
|
|
764
757
|
/**
|
|
765
|
-
|
|
766
|
-
|
|
758
|
+
* @inheritDoc
|
|
759
|
+
*/ static get isOfficialPlugin() {
|
|
767
760
|
return true;
|
|
768
761
|
}
|
|
769
762
|
/**
|
|
770
|
-
|
|
771
|
-
|
|
763
|
+
* @inheritDoc
|
|
764
|
+
*/ init() {
|
|
772
765
|
const editor = this.editor;
|
|
773
766
|
// Allow super attribute on text nodes.
|
|
774
767
|
editor.model.schema.extend('$text', {
|
|
@@ -795,32 +788,30 @@ const SUPERSCRIPT$1 = 'superscript';
|
|
|
795
788
|
}
|
|
796
789
|
}
|
|
797
790
|
|
|
798
|
-
var superscriptIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15.677 8.678h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309zM7.03 10.349l3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82z\"/></svg>";
|
|
799
|
-
|
|
800
791
|
const SUPERSCRIPT = 'superscript';
|
|
801
792
|
/**
|
|
802
793
|
* The superscript UI feature. It introduces the Superscript button.
|
|
803
794
|
*/ class SuperscriptUI extends Plugin {
|
|
804
795
|
/**
|
|
805
|
-
|
|
806
|
-
|
|
796
|
+
* @inheritDoc
|
|
797
|
+
*/ static get pluginName() {
|
|
807
798
|
return 'SuperscriptUI';
|
|
808
799
|
}
|
|
809
800
|
/**
|
|
810
|
-
|
|
811
|
-
|
|
801
|
+
* @inheritDoc
|
|
802
|
+
*/ static get isOfficialPlugin() {
|
|
812
803
|
return true;
|
|
813
804
|
}
|
|
814
805
|
/**
|
|
815
|
-
|
|
816
|
-
|
|
806
|
+
* @inheritDoc
|
|
807
|
+
*/ init() {
|
|
817
808
|
const editor = this.editor;
|
|
818
809
|
const t = editor.locale.t;
|
|
819
810
|
const createButton = getButtonCreator({
|
|
820
811
|
editor,
|
|
821
812
|
commandName: SUPERSCRIPT,
|
|
822
813
|
plugin: this,
|
|
823
|
-
icon:
|
|
814
|
+
icon: IconSuperscript,
|
|
824
815
|
label: t('Superscript')
|
|
825
816
|
});
|
|
826
817
|
// Add superscript button to feature components.
|
|
@@ -836,21 +827,21 @@ const SUPERSCRIPT = 'superscript';
|
|
|
836
827
|
* {@link module:basic-styles/superscript/superscriptui~SuperscriptUI} plugins.
|
|
837
828
|
*/ class Superscript extends Plugin {
|
|
838
829
|
/**
|
|
839
|
-
|
|
840
|
-
|
|
830
|
+
* @inheritDoc
|
|
831
|
+
*/ static get requires() {
|
|
841
832
|
return [
|
|
842
833
|
SuperscriptEditing,
|
|
843
834
|
SuperscriptUI
|
|
844
835
|
];
|
|
845
836
|
}
|
|
846
837
|
/**
|
|
847
|
-
|
|
848
|
-
|
|
838
|
+
* @inheritDoc
|
|
839
|
+
*/ static get pluginName() {
|
|
849
840
|
return 'Superscript';
|
|
850
841
|
}
|
|
851
842
|
/**
|
|
852
|
-
|
|
853
|
-
|
|
843
|
+
* @inheritDoc
|
|
844
|
+
*/ static get isOfficialPlugin() {
|
|
854
845
|
return true;
|
|
855
846
|
}
|
|
856
847
|
}
|
|
@@ -863,18 +854,18 @@ const UNDERLINE$1 = 'underline';
|
|
|
863
854
|
* and introduces the `underline` attribute in the model which renders to the view as an `<u>` element.
|
|
864
855
|
*/ class UnderlineEditing extends Plugin {
|
|
865
856
|
/**
|
|
866
|
-
|
|
867
|
-
|
|
857
|
+
* @inheritDoc
|
|
858
|
+
*/ static get pluginName() {
|
|
868
859
|
return 'UnderlineEditing';
|
|
869
860
|
}
|
|
870
861
|
/**
|
|
871
|
-
|
|
872
|
-
|
|
862
|
+
* @inheritDoc
|
|
863
|
+
*/ static get isOfficialPlugin() {
|
|
873
864
|
return true;
|
|
874
865
|
}
|
|
875
866
|
/**
|
|
876
|
-
|
|
877
|
-
|
|
867
|
+
* @inheritDoc
|
|
868
|
+
*/ init() {
|
|
878
869
|
const editor = this.editor;
|
|
879
870
|
const t = this.editor.t;
|
|
880
871
|
// Allow strikethrough attribute on text nodes.
|
|
@@ -910,32 +901,30 @@ const UNDERLINE$1 = 'underline';
|
|
|
910
901
|
}
|
|
911
902
|
}
|
|
912
903
|
|
|
913
|
-
var underlineIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8 1.9 0 3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4z\"/></svg>";
|
|
914
|
-
|
|
915
904
|
const UNDERLINE = 'underline';
|
|
916
905
|
/**
|
|
917
906
|
* The underline UI feature. It introduces the Underline button.
|
|
918
907
|
*/ class UnderlineUI extends Plugin {
|
|
919
908
|
/**
|
|
920
|
-
|
|
921
|
-
|
|
909
|
+
* @inheritDoc
|
|
910
|
+
*/ static get pluginName() {
|
|
922
911
|
return 'UnderlineUI';
|
|
923
912
|
}
|
|
924
913
|
/**
|
|
925
|
-
|
|
926
|
-
|
|
914
|
+
* @inheritDoc
|
|
915
|
+
*/ static get isOfficialPlugin() {
|
|
927
916
|
return true;
|
|
928
917
|
}
|
|
929
918
|
/**
|
|
930
|
-
|
|
931
|
-
|
|
919
|
+
* @inheritDoc
|
|
920
|
+
*/ init() {
|
|
932
921
|
const editor = this.editor;
|
|
933
922
|
const t = editor.locale.t;
|
|
934
923
|
const createButton = getButtonCreator({
|
|
935
924
|
editor,
|
|
936
925
|
commandName: UNDERLINE,
|
|
937
926
|
plugin: this,
|
|
938
|
-
icon:
|
|
927
|
+
icon: IconUnderline,
|
|
939
928
|
label: t('Underline'),
|
|
940
929
|
keystroke: 'CTRL+U'
|
|
941
930
|
});
|
|
@@ -955,24 +944,24 @@ const UNDERLINE = 'underline';
|
|
|
955
944
|
* {@link module:basic-styles/underline/underlineui~UnderlineUI} plugins.
|
|
956
945
|
*/ class Underline extends Plugin {
|
|
957
946
|
/**
|
|
958
|
-
|
|
959
|
-
|
|
947
|
+
* @inheritDoc
|
|
948
|
+
*/ static get requires() {
|
|
960
949
|
return [
|
|
961
950
|
UnderlineEditing,
|
|
962
951
|
UnderlineUI
|
|
963
952
|
];
|
|
964
953
|
}
|
|
965
954
|
/**
|
|
966
|
-
|
|
967
|
-
|
|
955
|
+
* @inheritDoc
|
|
956
|
+
*/ static get pluginName() {
|
|
968
957
|
return 'Underline';
|
|
969
958
|
}
|
|
970
959
|
/**
|
|
971
|
-
|
|
972
|
-
|
|
960
|
+
* @inheritDoc
|
|
961
|
+
*/ static get isOfficialPlugin() {
|
|
973
962
|
return true;
|
|
974
963
|
}
|
|
975
964
|
}
|
|
976
965
|
|
|
977
|
-
export { AttributeCommand, Bold, BoldEditing, BoldUI, Code, CodeEditing, CodeUI, Italic, ItalicEditing, ItalicUI, Strikethrough, StrikethroughEditing, StrikethroughUI, Subscript, SubscriptEditing, SubscriptUI, Superscript, SuperscriptEditing, SuperscriptUI, Underline, UnderlineEditing, UnderlineUI };
|
|
966
|
+
export { AttributeCommand, Bold, BoldEditing, BoldUI, Code, CodeEditing, CodeUI, Italic, ItalicEditing, ItalicUI, Strikethrough, StrikethroughEditing, StrikethroughUI, Subscript, SubscriptEditing, SubscriptUI, Superscript, SuperscriptEditing, SuperscriptUI, Underline, UnderlineEditing, UnderlineUI, getButtonCreator as _getBasicStylesButtonCreator };
|
|
978
967
|
//# sourceMappingURL=index.js.map
|