@ckeditor/ckeditor5-horizontal-line 47.6.1 → 48.0.0-alpha.1

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 (167) hide show
  1. package/ckeditor5-metadata.json +2 -2
  2. package/{src → dist}/horizontalline.d.ts +2 -2
  3. package/{src → dist}/horizontallinecommand.d.ts +1 -1
  4. package/{src → dist}/horizontallineediting.d.ts +1 -1
  5. package/{src → dist}/horizontallineui.d.ts +1 -1
  6. package/dist/index-content.css +4 -4
  7. package/dist/index-editor.css +1 -1
  8. package/dist/index.css +5 -12
  9. package/dist/index.css.map +1 -1
  10. package/dist/index.js.map +1 -1
  11. package/package.json +24 -47
  12. package/build/horizontal-line.js +0 -5
  13. package/build/translations/af.js +0 -1
  14. package/build/translations/ar.js +0 -1
  15. package/build/translations/ast.js +0 -1
  16. package/build/translations/az.js +0 -1
  17. package/build/translations/be.js +0 -1
  18. package/build/translations/bg.js +0 -1
  19. package/build/translations/bn.js +0 -1
  20. package/build/translations/bs.js +0 -1
  21. package/build/translations/ca.js +0 -1
  22. package/build/translations/cs.js +0 -1
  23. package/build/translations/da.js +0 -1
  24. package/build/translations/de-ch.js +0 -1
  25. package/build/translations/de.js +0 -1
  26. package/build/translations/el.js +0 -1
  27. package/build/translations/en-au.js +0 -1
  28. package/build/translations/en-gb.js +0 -1
  29. package/build/translations/eo.js +0 -1
  30. package/build/translations/es-co.js +0 -1
  31. package/build/translations/es.js +0 -1
  32. package/build/translations/et.js +0 -1
  33. package/build/translations/eu.js +0 -1
  34. package/build/translations/fa.js +0 -1
  35. package/build/translations/fi.js +0 -1
  36. package/build/translations/fr.js +0 -1
  37. package/build/translations/gl.js +0 -1
  38. package/build/translations/gu.js +0 -1
  39. package/build/translations/he.js +0 -1
  40. package/build/translations/hi.js +0 -1
  41. package/build/translations/hr.js +0 -1
  42. package/build/translations/hu.js +0 -1
  43. package/build/translations/hy.js +0 -1
  44. package/build/translations/id.js +0 -1
  45. package/build/translations/it.js +0 -1
  46. package/build/translations/ja.js +0 -1
  47. package/build/translations/jv.js +0 -1
  48. package/build/translations/kk.js +0 -1
  49. package/build/translations/km.js +0 -1
  50. package/build/translations/kn.js +0 -1
  51. package/build/translations/ko.js +0 -1
  52. package/build/translations/ku.js +0 -1
  53. package/build/translations/lt.js +0 -1
  54. package/build/translations/lv.js +0 -1
  55. package/build/translations/ms.js +0 -1
  56. package/build/translations/nb.js +0 -1
  57. package/build/translations/ne.js +0 -1
  58. package/build/translations/nl.js +0 -1
  59. package/build/translations/no.js +0 -1
  60. package/build/translations/oc.js +0 -1
  61. package/build/translations/pl.js +0 -1
  62. package/build/translations/pt-br.js +0 -1
  63. package/build/translations/pt.js +0 -1
  64. package/build/translations/ro.js +0 -1
  65. package/build/translations/ru.js +0 -1
  66. package/build/translations/si.js +0 -1
  67. package/build/translations/sk.js +0 -1
  68. package/build/translations/sl.js +0 -1
  69. package/build/translations/sq.js +0 -1
  70. package/build/translations/sr-latn.js +0 -1
  71. package/build/translations/sr.js +0 -1
  72. package/build/translations/sv.js +0 -1
  73. package/build/translations/th.js +0 -1
  74. package/build/translations/ti.js +0 -1
  75. package/build/translations/tk.js +0 -1
  76. package/build/translations/tr.js +0 -1
  77. package/build/translations/tt.js +0 -1
  78. package/build/translations/ug.js +0 -1
  79. package/build/translations/uk.js +0 -1
  80. package/build/translations/ur.js +0 -1
  81. package/build/translations/uz.js +0 -1
  82. package/build/translations/vi.js +0 -1
  83. package/build/translations/zh-cn.js +0 -1
  84. package/build/translations/zh.js +0 -1
  85. package/lang/contexts.json +0 -3
  86. package/lang/translations/af.po +0 -16
  87. package/lang/translations/ar.po +0 -16
  88. package/lang/translations/ast.po +0 -16
  89. package/lang/translations/az.po +0 -16
  90. package/lang/translations/be.po +0 -16
  91. package/lang/translations/bg.po +0 -16
  92. package/lang/translations/bn.po +0 -16
  93. package/lang/translations/bs.po +0 -16
  94. package/lang/translations/ca.po +0 -16
  95. package/lang/translations/cs.po +0 -16
  96. package/lang/translations/da.po +0 -16
  97. package/lang/translations/de-ch.po +0 -16
  98. package/lang/translations/de.po +0 -16
  99. package/lang/translations/el.po +0 -16
  100. package/lang/translations/en-au.po +0 -16
  101. package/lang/translations/en-gb.po +0 -16
  102. package/lang/translations/en.po +0 -16
  103. package/lang/translations/eo.po +0 -16
  104. package/lang/translations/es-co.po +0 -16
  105. package/lang/translations/es.po +0 -16
  106. package/lang/translations/et.po +0 -16
  107. package/lang/translations/eu.po +0 -16
  108. package/lang/translations/fa.po +0 -16
  109. package/lang/translations/fi.po +0 -16
  110. package/lang/translations/fr.po +0 -16
  111. package/lang/translations/gl.po +0 -16
  112. package/lang/translations/gu.po +0 -16
  113. package/lang/translations/he.po +0 -16
  114. package/lang/translations/hi.po +0 -16
  115. package/lang/translations/hr.po +0 -16
  116. package/lang/translations/hu.po +0 -16
  117. package/lang/translations/hy.po +0 -16
  118. package/lang/translations/id.po +0 -16
  119. package/lang/translations/it.po +0 -16
  120. package/lang/translations/ja.po +0 -16
  121. package/lang/translations/jv.po +0 -16
  122. package/lang/translations/kk.po +0 -16
  123. package/lang/translations/km.po +0 -16
  124. package/lang/translations/kn.po +0 -16
  125. package/lang/translations/ko.po +0 -16
  126. package/lang/translations/ku.po +0 -16
  127. package/lang/translations/lt.po +0 -16
  128. package/lang/translations/lv.po +0 -16
  129. package/lang/translations/ms.po +0 -16
  130. package/lang/translations/nb.po +0 -16
  131. package/lang/translations/ne.po +0 -16
  132. package/lang/translations/nl.po +0 -16
  133. package/lang/translations/no.po +0 -16
  134. package/lang/translations/oc.po +0 -16
  135. package/lang/translations/pl.po +0 -16
  136. package/lang/translations/pt-br.po +0 -16
  137. package/lang/translations/pt.po +0 -16
  138. package/lang/translations/ro.po +0 -16
  139. package/lang/translations/ru.po +0 -16
  140. package/lang/translations/si.po +0 -16
  141. package/lang/translations/sk.po +0 -16
  142. package/lang/translations/sl.po +0 -16
  143. package/lang/translations/sq.po +0 -16
  144. package/lang/translations/sr-latn.po +0 -16
  145. package/lang/translations/sr.po +0 -16
  146. package/lang/translations/sv.po +0 -16
  147. package/lang/translations/th.po +0 -16
  148. package/lang/translations/ti.po +0 -16
  149. package/lang/translations/tk.po +0 -16
  150. package/lang/translations/tr.po +0 -16
  151. package/lang/translations/tt.po +0 -16
  152. package/lang/translations/ug.po +0 -16
  153. package/lang/translations/uk.po +0 -16
  154. package/lang/translations/ur.po +0 -16
  155. package/lang/translations/uz.po +0 -16
  156. package/lang/translations/vi.po +0 -16
  157. package/lang/translations/zh-cn.po +0 -16
  158. package/lang/translations/zh.po +0 -16
  159. package/src/augmentation.js +0 -5
  160. package/src/horizontalline.js +0 -38
  161. package/src/horizontallinecommand.js +0 -63
  162. package/src/horizontallineediting.js +0 -70
  163. package/src/horizontallineui.js +0 -65
  164. package/src/index.js +0 -12
  165. package/theme/horizontalline.css +0 -17
  166. /package/{src → dist}/augmentation.d.ts +0 -0
  167. /package/{src → dist}/index.d.ts +0 -0
@@ -1,16 +0,0 @@
1
- # Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2
- #
3
- # Want to contribute to this file? Submit your changes via a GitHub Pull Request.
4
- #
5
- # Check out the official contributor's guide:
6
- # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
7
- #
8
- msgid ""
9
- msgstr ""
10
- "Language: uz\n"
11
- "Plural-Forms: nplurals=2; plural=(n > 1);\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
-
14
- msgctxt "Horizontal line"
15
- msgid "Horizontal line"
16
- msgstr "Gorizontal chiziq"
@@ -1,16 +0,0 @@
1
- # Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2
- #
3
- # Want to contribute to this file? Submit your changes via a GitHub Pull Request.
4
- #
5
- # Check out the official contributor's guide:
6
- # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
7
- #
8
- msgid ""
9
- msgstr ""
10
- "Language: vi\n"
11
- "Plural-Forms: nplurals=1; plural=0;\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
-
14
- msgctxt "Horizontal line"
15
- msgid "Horizontal line"
16
- msgstr "Đường ngang"
@@ -1,16 +0,0 @@
1
- # Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2
- #
3
- # Want to contribute to this file? Submit your changes via a GitHub Pull Request.
4
- #
5
- # Check out the official contributor's guide:
6
- # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
7
- #
8
- msgid ""
9
- msgstr ""
10
- "Language: zh_CN\n"
11
- "Plural-Forms: nplurals=1; plural=0;\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
-
14
- msgctxt "Horizontal line"
15
- msgid "Horizontal line"
16
- msgstr "水平线"
@@ -1,16 +0,0 @@
1
- # Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2
- #
3
- # Want to contribute to this file? Submit your changes via a GitHub Pull Request.
4
- #
5
- # Check out the official contributor's guide:
6
- # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
7
- #
8
- msgid ""
9
- msgstr ""
10
- "Language: zh_TW\n"
11
- "Plural-Forms: nplurals=1; plural=0;\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
-
14
- msgctxt "Horizontal line"
15
- msgid "Horizontal line"
16
- msgstr "水平線"
@@ -1,5 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- export {};
@@ -1,38 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module horizontal-line/horizontalline
7
- */
8
- import { Plugin } from 'ckeditor5/src/core.js';
9
- import { Widget } from 'ckeditor5/src/widget.js';
10
- import { HorizontalLineEditing } from './horizontallineediting.js';
11
- import { HorizontalLineUI } from './horizontallineui.js';
12
- /**
13
- * The horizontal line feature.
14
- *
15
- * It provides the possibility to insert a horizontal line into the rich-text editor.
16
- *
17
- * For a detailed overview, check the {@glink features/horizontal-line Horizontal line feature} documentation.
18
- */
19
- export class HorizontalLine extends Plugin {
20
- /**
21
- * @inheritDoc
22
- */
23
- static get requires() {
24
- return [HorizontalLineEditing, HorizontalLineUI, Widget];
25
- }
26
- /**
27
- * @inheritDoc
28
- */
29
- static get pluginName() {
30
- return 'HorizontalLine';
31
- }
32
- /**
33
- * @inheritDoc
34
- */
35
- static get isOfficialPlugin() {
36
- return true;
37
- }
38
- }
@@ -1,63 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import { Command } from 'ckeditor5/src/core.js';
6
- import { findOptimalInsertionRange } from 'ckeditor5/src/widget.js';
7
- /**
8
- * The horizontal line command.
9
- *
10
- * The command is registered by {@link module:horizontal-line/horizontallineediting~HorizontalLineEditing} as `'horizontalLine'`.
11
- *
12
- * To insert a horizontal line at the current selection, execute the command:
13
- *
14
- * ```ts
15
- * editor.execute( 'horizontalLine' );
16
- * ```
17
- */
18
- export class HorizontalLineCommand extends Command {
19
- /**
20
- * @inheritDoc
21
- */
22
- refresh() {
23
- const model = this.editor.model;
24
- const schema = model.schema;
25
- const selection = model.document.selection;
26
- this.isEnabled = isHorizontalLineAllowedInParent(selection, schema, model);
27
- }
28
- /**
29
- * Executes the command.
30
- *
31
- * @fires execute
32
- */
33
- execute() {
34
- const model = this.editor.model;
35
- model.change(writer => {
36
- const horizontalElement = writer.createElement('horizontalLine');
37
- model.insertObject(horizontalElement, null, null, { setSelection: 'after' });
38
- });
39
- }
40
- }
41
- /**
42
- * Checks if a horizontal line is allowed by the schema in the optimal insertion parent.
43
- *
44
- * @param model Model instance.
45
- */
46
- function isHorizontalLineAllowedInParent(selection, schema, model) {
47
- const parent = getInsertHorizontalLineParent(selection, model);
48
- return schema.checkChild(parent, 'horizontalLine');
49
- }
50
- /**
51
- * Returns a node that will be used to insert a horizontal line with `model.insertContent` to check if the horizontal line can be
52
- * placed there.
53
- *
54
- * @param model Model instance.
55
- */
56
- function getInsertHorizontalLineParent(selection, model) {
57
- const insertionRange = findOptimalInsertionRange(selection, model);
58
- const parent = insertionRange.start.parent;
59
- if (parent.isEmpty && !parent.is('element', '$root')) {
60
- return parent.parent;
61
- }
62
- return parent;
63
- }
@@ -1,70 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module horizontal-line/horizontallineediting
7
- */
8
- import { Plugin } from 'ckeditor5/src/core.js';
9
- import { toWidget } from 'ckeditor5/src/widget.js';
10
- import { HorizontalLineCommand } from './horizontallinecommand.js';
11
- import '../theme/horizontalline.css';
12
- /**
13
- * The horizontal line editing feature.
14
- */
15
- export class HorizontalLineEditing extends Plugin {
16
- /**
17
- * @inheritDoc
18
- */
19
- static get pluginName() {
20
- return 'HorizontalLineEditing';
21
- }
22
- /**
23
- * @inheritDoc
24
- */
25
- static get isOfficialPlugin() {
26
- return true;
27
- }
28
- /**
29
- * @inheritDoc
30
- */
31
- init() {
32
- const editor = this.editor;
33
- const schema = editor.model.schema;
34
- const t = editor.t;
35
- const conversion = editor.conversion;
36
- schema.register('horizontalLine', {
37
- inheritAllFrom: '$blockObject'
38
- });
39
- conversion.for('dataDowncast').elementToElement({
40
- model: 'horizontalLine',
41
- view: (modelElement, { writer }) => {
42
- return writer.createEmptyElement('hr');
43
- }
44
- });
45
- conversion.for('editingDowncast').elementToStructure({
46
- model: 'horizontalLine',
47
- view: (modelElement, { writer }) => {
48
- const label = t('Horizontal line');
49
- const viewWrapper = writer.createContainerElement('div', null, writer.createEmptyElement('hr'));
50
- writer.addClass('ck-horizontal-line', viewWrapper);
51
- writer.setCustomProperty('hr', true, viewWrapper);
52
- return toHorizontalLineWidget(viewWrapper, writer, label);
53
- }
54
- });
55
- conversion.for('upcast').elementToElement({ view: 'hr', model: 'horizontalLine' });
56
- editor.commands.add('horizontalLine', new HorizontalLineCommand(editor));
57
- }
58
- }
59
- /**
60
- * Converts a given {@link module:engine/view/element~ViewElement} to a horizontal line widget:
61
- * * Adds a {@link module:engine/view/element~ViewElement#_setCustomProperty custom property} allowing to
62
- * recognize the horizontal line widget element.
63
- * * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.
64
- *
65
- * @param writer An instance of the view writer.
66
- */
67
- function toHorizontalLineWidget(viewElement, writer, label) {
68
- writer.setCustomProperty('horizontalLine', true, viewElement);
69
- return toWidget(viewElement, writer, { label });
70
- }
@@ -1,65 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module horizontal-line/horizontallineui
7
- */
8
- import { Plugin } from 'ckeditor5/src/core.js';
9
- import { IconHorizontalLine } from 'ckeditor5/src/icons.js';
10
- import { ButtonView, MenuBarMenuListItemButtonView } from 'ckeditor5/src/ui.js';
11
- /**
12
- * The horizontal line UI plugin.
13
- */
14
- export class HorizontalLineUI extends Plugin {
15
- /**
16
- * @inheritDoc
17
- */
18
- static get pluginName() {
19
- return 'HorizontalLineUI';
20
- }
21
- /**
22
- * @inheritDoc
23
- */
24
- static get isOfficialPlugin() {
25
- return true;
26
- }
27
- /**
28
- * @inheritDoc
29
- */
30
- init() {
31
- const editor = this.editor;
32
- // Add the `horizontalLine` button to feature components.
33
- editor.ui.componentFactory.add('horizontalLine', () => {
34
- const buttonView = this._createButton(ButtonView);
35
- buttonView.set({
36
- tooltip: true
37
- });
38
- return buttonView;
39
- });
40
- editor.ui.componentFactory.add('menuBar:horizontalLine', () => {
41
- return this._createButton(MenuBarMenuListItemButtonView);
42
- });
43
- }
44
- /**
45
- * Creates a button for horizontal line command to use either in toolbar or in menu bar.
46
- */
47
- _createButton(ButtonClass) {
48
- const editor = this.editor;
49
- const locale = editor.locale;
50
- const command = editor.commands.get('horizontalLine');
51
- const view = new ButtonClass(editor.locale);
52
- const t = locale.t;
53
- view.set({
54
- label: t('Horizontal line'),
55
- icon: IconHorizontalLine
56
- });
57
- view.bind('isEnabled').to(command, 'isEnabled');
58
- // Execute the command.
59
- this.listenTo(view, 'execute', () => {
60
- editor.execute('horizontalLine');
61
- editor.editing.view.focus();
62
- });
63
- return view;
64
- }
65
- }
package/src/index.js DELETED
@@ -1,12 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module horizontal-line
7
- */
8
- export { HorizontalLine } from './horizontalline.js';
9
- export { HorizontalLineEditing } from './horizontallineediting.js';
10
- export { HorizontalLineUI } from './horizontallineui.js';
11
- export { HorizontalLineCommand } from './horizontallinecommand.js';
12
- import './augmentation.js';
@@ -1,17 +0,0 @@
1
- /*
2
- * Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
-
6
-
7
- .ck-editor__editable .ck-horizontal-line {
8
- /* Necessary to render properly next to floated objects, e.g. side image case. */
9
- display: flow-root;
10
- }
11
-
12
- .ck-content hr {
13
- margin: 15px 0;
14
- height: 4px;
15
- background: hsl(0, 0%, 87%);
16
- border: 0;
17
- }
File without changes
File without changes