@ckeditor/ckeditor5-html-embed 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 (168) hide show
  1. package/ckeditor5-metadata.json +2 -2
  2. package/{src → dist}/htmlembed.d.ts +2 -2
  3. package/{src → dist}/htmlembedcommand.d.ts +1 -1
  4. package/{src → dist}/htmlembedediting.d.ts +1 -1
  5. package/{src → dist}/htmlembedui.d.ts +1 -1
  6. package/dist/index-editor.css +165 -35
  7. package/dist/index.css +164 -56
  8. package/dist/index.css.map +1 -1
  9. package/dist/index.js.map +1 -1
  10. package/package.json +24 -47
  11. package/build/html-embed.js +0 -5
  12. package/build/translations/af.js +0 -1
  13. package/build/translations/ar.js +0 -1
  14. package/build/translations/ast.js +0 -1
  15. package/build/translations/az.js +0 -1
  16. package/build/translations/be.js +0 -1
  17. package/build/translations/bg.js +0 -1
  18. package/build/translations/bn.js +0 -1
  19. package/build/translations/bs.js +0 -1
  20. package/build/translations/ca.js +0 -1
  21. package/build/translations/cs.js +0 -1
  22. package/build/translations/da.js +0 -1
  23. package/build/translations/de-ch.js +0 -1
  24. package/build/translations/de.js +0 -1
  25. package/build/translations/el.js +0 -1
  26. package/build/translations/en-au.js +0 -1
  27. package/build/translations/en-gb.js +0 -1
  28. package/build/translations/eo.js +0 -1
  29. package/build/translations/es-co.js +0 -1
  30. package/build/translations/es.js +0 -1
  31. package/build/translations/et.js +0 -1
  32. package/build/translations/eu.js +0 -1
  33. package/build/translations/fa.js +0 -1
  34. package/build/translations/fi.js +0 -1
  35. package/build/translations/fr.js +0 -1
  36. package/build/translations/gl.js +0 -1
  37. package/build/translations/gu.js +0 -1
  38. package/build/translations/he.js +0 -1
  39. package/build/translations/hi.js +0 -1
  40. package/build/translations/hr.js +0 -1
  41. package/build/translations/hu.js +0 -1
  42. package/build/translations/hy.js +0 -1
  43. package/build/translations/id.js +0 -1
  44. package/build/translations/it.js +0 -1
  45. package/build/translations/ja.js +0 -1
  46. package/build/translations/jv.js +0 -1
  47. package/build/translations/kk.js +0 -1
  48. package/build/translations/km.js +0 -1
  49. package/build/translations/kn.js +0 -1
  50. package/build/translations/ko.js +0 -1
  51. package/build/translations/ku.js +0 -1
  52. package/build/translations/lt.js +0 -1
  53. package/build/translations/lv.js +0 -1
  54. package/build/translations/ms.js +0 -1
  55. package/build/translations/nb.js +0 -1
  56. package/build/translations/ne.js +0 -1
  57. package/build/translations/nl.js +0 -1
  58. package/build/translations/no.js +0 -1
  59. package/build/translations/oc.js +0 -1
  60. package/build/translations/pl.js +0 -1
  61. package/build/translations/pt-br.js +0 -1
  62. package/build/translations/pt.js +0 -1
  63. package/build/translations/ro.js +0 -1
  64. package/build/translations/ru.js +0 -1
  65. package/build/translations/si.js +0 -1
  66. package/build/translations/sk.js +0 -1
  67. package/build/translations/sl.js +0 -1
  68. package/build/translations/sq.js +0 -1
  69. package/build/translations/sr-latn.js +0 -1
  70. package/build/translations/sr.js +0 -1
  71. package/build/translations/sv.js +0 -1
  72. package/build/translations/th.js +0 -1
  73. package/build/translations/ti.js +0 -1
  74. package/build/translations/tk.js +0 -1
  75. package/build/translations/tr.js +0 -1
  76. package/build/translations/tt.js +0 -1
  77. package/build/translations/ug.js +0 -1
  78. package/build/translations/uk.js +0 -1
  79. package/build/translations/ur.js +0 -1
  80. package/build/translations/uz.js +0 -1
  81. package/build/translations/vi.js +0 -1
  82. package/build/translations/zh-cn.js +0 -1
  83. package/build/translations/zh.js +0 -1
  84. package/lang/contexts.json +0 -9
  85. package/lang/translations/af.po +0 -40
  86. package/lang/translations/ar.po +0 -40
  87. package/lang/translations/ast.po +0 -40
  88. package/lang/translations/az.po +0 -40
  89. package/lang/translations/be.po +0 -40
  90. package/lang/translations/bg.po +0 -40
  91. package/lang/translations/bn.po +0 -40
  92. package/lang/translations/bs.po +0 -40
  93. package/lang/translations/ca.po +0 -40
  94. package/lang/translations/cs.po +0 -40
  95. package/lang/translations/da.po +0 -40
  96. package/lang/translations/de-ch.po +0 -40
  97. package/lang/translations/de.po +0 -40
  98. package/lang/translations/el.po +0 -40
  99. package/lang/translations/en-au.po +0 -40
  100. package/lang/translations/en-gb.po +0 -40
  101. package/lang/translations/en.po +0 -40
  102. package/lang/translations/eo.po +0 -40
  103. package/lang/translations/es-co.po +0 -40
  104. package/lang/translations/es.po +0 -40
  105. package/lang/translations/et.po +0 -40
  106. package/lang/translations/eu.po +0 -40
  107. package/lang/translations/fa.po +0 -40
  108. package/lang/translations/fi.po +0 -40
  109. package/lang/translations/fr.po +0 -40
  110. package/lang/translations/gl.po +0 -40
  111. package/lang/translations/gu.po +0 -40
  112. package/lang/translations/he.po +0 -40
  113. package/lang/translations/hi.po +0 -40
  114. package/lang/translations/hr.po +0 -40
  115. package/lang/translations/hu.po +0 -40
  116. package/lang/translations/hy.po +0 -40
  117. package/lang/translations/id.po +0 -40
  118. package/lang/translations/it.po +0 -40
  119. package/lang/translations/ja.po +0 -40
  120. package/lang/translations/jv.po +0 -40
  121. package/lang/translations/kk.po +0 -40
  122. package/lang/translations/km.po +0 -40
  123. package/lang/translations/kn.po +0 -40
  124. package/lang/translations/ko.po +0 -40
  125. package/lang/translations/ku.po +0 -40
  126. package/lang/translations/lt.po +0 -40
  127. package/lang/translations/lv.po +0 -40
  128. package/lang/translations/ms.po +0 -40
  129. package/lang/translations/nb.po +0 -40
  130. package/lang/translations/ne.po +0 -40
  131. package/lang/translations/nl.po +0 -40
  132. package/lang/translations/no.po +0 -40
  133. package/lang/translations/oc.po +0 -40
  134. package/lang/translations/pl.po +0 -40
  135. package/lang/translations/pt-br.po +0 -40
  136. package/lang/translations/pt.po +0 -40
  137. package/lang/translations/ro.po +0 -40
  138. package/lang/translations/ru.po +0 -40
  139. package/lang/translations/si.po +0 -40
  140. package/lang/translations/sk.po +0 -40
  141. package/lang/translations/sl.po +0 -40
  142. package/lang/translations/sq.po +0 -40
  143. package/lang/translations/sr-latn.po +0 -40
  144. package/lang/translations/sr.po +0 -40
  145. package/lang/translations/sv.po +0 -40
  146. package/lang/translations/th.po +0 -40
  147. package/lang/translations/ti.po +0 -40
  148. package/lang/translations/tk.po +0 -40
  149. package/lang/translations/tr.po +0 -40
  150. package/lang/translations/tt.po +0 -40
  151. package/lang/translations/ug.po +0 -40
  152. package/lang/translations/uk.po +0 -40
  153. package/lang/translations/ur.po +0 -40
  154. package/lang/translations/uz.po +0 -40
  155. package/lang/translations/vi.po +0 -40
  156. package/lang/translations/zh-cn.po +0 -40
  157. package/lang/translations/zh.po +0 -40
  158. package/src/augmentation.js +0 -5
  159. package/src/htmlembed.js +0 -38
  160. package/src/htmlembedcommand.js +0 -95
  161. package/src/htmlembedconfig.js +0 -5
  162. package/src/htmlembedediting.js +0 -347
  163. package/src/htmlembedui.js +0 -73
  164. package/src/index.js +0 -12
  165. package/theme/htmlembed.css +0 -68
  166. /package/{src → dist}/augmentation.d.ts +0 -0
  167. /package/{src → dist}/htmlembedconfig.d.ts +0 -0
  168. /package/{src → dist}/index.d.ts +0 -0
@@ -1,73 +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 html-embed/htmlembedui
7
- */
8
- import { Plugin } from 'ckeditor5/src/core.js';
9
- import { IconHtml } from 'ckeditor5/src/icons.js';
10
- import { ButtonView, MenuBarMenuListItemButtonView } from 'ckeditor5/src/ui.js';
11
- /**
12
- * The HTML embed UI plugin.
13
- */
14
- export class HtmlEmbedUI extends Plugin {
15
- /**
16
- * @inheritDoc
17
- */
18
- static get pluginName() {
19
- return 'HtmlEmbedUI';
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
- const locale = editor.locale;
33
- const t = locale.t;
34
- // Add the `htmlEmbed` button to feature components.
35
- editor.ui.componentFactory.add('htmlEmbed', () => {
36
- const buttonView = this._createButton(ButtonView);
37
- buttonView.set({
38
- tooltip: true,
39
- label: t('Insert HTML')
40
- });
41
- return buttonView;
42
- });
43
- editor.ui.componentFactory.add('menuBar:htmlEmbed', () => {
44
- const buttonView = this._createButton(MenuBarMenuListItemButtonView);
45
- buttonView.set({
46
- label: t('HTML snippet')
47
- });
48
- return buttonView;
49
- });
50
- }
51
- /**
52
- * Creates a button for html embed command to use either in toolbar or in menu bar.
53
- */
54
- _createButton(ButtonClass) {
55
- const editor = this.editor;
56
- const command = editor.commands.get('htmlEmbed');
57
- const view = new ButtonClass(editor.locale);
58
- view.set({
59
- icon: IconHtml
60
- });
61
- view.bind('isEnabled').to(command, 'isEnabled');
62
- // Execute the command.
63
- this.listenTo(view, 'execute', () => {
64
- editor.execute('htmlEmbed');
65
- editor.editing.view.focus();
66
- const rawHtmlApi = editor.editing.view.document.selection
67
- .getSelectedElement()
68
- .getCustomProperty('rawHtmlApi');
69
- rawHtmlApi.makeEditable();
70
- });
71
- return view;
72
- }
73
- }
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 html-embed
7
- */
8
- export { HtmlEmbed } from './htmlembed.js';
9
- export { HtmlEmbedEditing } from './htmlembedediting.js';
10
- export { HtmlEmbedUI } from './htmlembedui.js';
11
- export { HtmlEmbedCommand } from './htmlembedcommand.js';
12
- import './augmentation.js';
@@ -1,68 +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
- /* The feature container. */
7
- .ck-widget.raw-html-embed {
8
- /* Give the embed some air. */
9
- /* The first value should be equal to --ck-spacing-large variable if used in the editor context
10
- to avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */
11
- margin: 0.9em auto;
12
- position: relative;
13
- display: flow-root;
14
-
15
- /* Give the html embed some minimal width in the content to prevent them
16
- from being "squashed" in tight spaces, e.g. in table cells (https://github.com/ckeditor/ckeditor5/issues/8331) */
17
- min-width: 15em;
18
-
19
- /* Don't inherit the style, e.g. when in a block quote. */
20
- font-style: normal;
21
-
22
- /* ----- Emebed label in the upper left corner ----------------------------------------------- */
23
-
24
- &::before {
25
- position: absolute;
26
-
27
- /* Make sure the content does not cover the label. */
28
- z-index: 1;
29
- }
30
-
31
- /* ----- Emebed internals --------------------------------------------------------------------- */
32
-
33
- /* The switch mode button wrapper. */
34
- & .raw-html-embed__buttons-wrapper {
35
- position: absolute;
36
- display: flex;
37
- flex-direction: column;
38
- }
39
-
40
- & .raw-html-embed__preview {
41
- position: relative;
42
- overflow: hidden;
43
- display: flex;
44
- }
45
-
46
- & .raw-html-embed__preview-content {
47
- width: 100%;
48
- position: relative;
49
- margin: auto;
50
-
51
- /* Gives spacing to the small renderable elements, so they always cover the placeholder. */
52
- display: table;
53
- border-collapse: separate;
54
- border-spacing: 7px;
55
- }
56
-
57
- & .raw-html-embed__preview-placeholder {
58
- position: absolute;
59
- left: 0;
60
- top: 0;
61
- right: 0;
62
- bottom: 0;
63
-
64
- display: flex;
65
- align-items: center;
66
- justify-content: center;
67
- }
68
- }
File without changes
File without changes
File without changes