@ckeditor/ckeditor5-html-embed 39.0.2 → 40.0.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.
@@ -1,21 +1,21 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module html-embed/htmlembedui
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- /**
10
- * The HTML embed UI plugin.
11
- */
12
- export default class HtmlEmbedUI extends Plugin {
13
- /**
14
- * @inheritDoc
15
- */
16
- static get pluginName(): "HtmlEmbedUI";
17
- /**
18
- * @inheritDoc
19
- */
20
- init(): void;
21
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module html-embed/htmlembedui
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ /**
10
+ * The HTML embed UI plugin.
11
+ */
12
+ export default class HtmlEmbedUI extends Plugin {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static get pluginName(): "HtmlEmbedUI";
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ init(): void;
21
+ }
@@ -1,49 +1,49 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module html-embed/htmlembedui
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { ButtonView } from 'ckeditor5/src/ui';
10
- import htmlEmbedIcon from '../theme/icons/html.svg';
11
- /**
12
- * The HTML embed UI plugin.
13
- */
14
- export default class HtmlEmbedUI extends Plugin {
15
- /**
16
- * @inheritDoc
17
- */
18
- static get pluginName() {
19
- return 'HtmlEmbedUI';
20
- }
21
- /**
22
- * @inheritDoc
23
- */
24
- init() {
25
- const editor = this.editor;
26
- const t = editor.t;
27
- // Add the `htmlEmbed` button to feature components.
28
- editor.ui.componentFactory.add('htmlEmbed', locale => {
29
- const command = editor.commands.get('htmlEmbed');
30
- const view = new ButtonView(locale);
31
- view.set({
32
- label: t('Insert HTML'),
33
- icon: htmlEmbedIcon,
34
- tooltip: true
35
- });
36
- view.bind('isEnabled').to(command, 'isEnabled');
37
- // Execute the command.
38
- this.listenTo(view, 'execute', () => {
39
- editor.execute('htmlEmbed');
40
- editor.editing.view.focus();
41
- const rawHtmlApi = editor.editing.view.document.selection
42
- .getSelectedElement()
43
- .getCustomProperty('rawHtmlApi');
44
- rawHtmlApi.makeEditable();
45
- });
46
- return view;
47
- });
48
- }
49
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module html-embed/htmlembedui
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import { ButtonView } from 'ckeditor5/src/ui';
10
+ import htmlEmbedIcon from '../theme/icons/html.svg';
11
+ /**
12
+ * The HTML embed UI plugin.
13
+ */
14
+ export default class HtmlEmbedUI extends Plugin {
15
+ /**
16
+ * @inheritDoc
17
+ */
18
+ static get pluginName() {
19
+ return 'HtmlEmbedUI';
20
+ }
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ init() {
25
+ const editor = this.editor;
26
+ const t = editor.t;
27
+ // Add the `htmlEmbed` button to feature components.
28
+ editor.ui.componentFactory.add('htmlEmbed', locale => {
29
+ const command = editor.commands.get('htmlEmbed');
30
+ const view = new ButtonView(locale);
31
+ view.set({
32
+ label: t('Insert HTML'),
33
+ icon: htmlEmbedIcon,
34
+ tooltip: true
35
+ });
36
+ view.bind('isEnabled').to(command, 'isEnabled');
37
+ // Execute the command.
38
+ this.listenTo(view, 'execute', () => {
39
+ editor.execute('htmlEmbed');
40
+ editor.editing.view.focus();
41
+ const rawHtmlApi = editor.editing.view.document.selection
42
+ .getSelectedElement()
43
+ .getCustomProperty('rawHtmlApi');
44
+ rawHtmlApi.makeEditable();
45
+ });
46
+ return view;
47
+ });
48
+ }
49
+ }
package/src/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module html-embed
7
- */
8
- export { default as HtmlEmbed } from './htmlembed';
9
- export { default as HtmlEmbedEditing } from './htmlembedediting';
10
- export { default as HtmlEmbedUI } from './htmlembedui';
11
- export type { default as HtmlEmbedCommand } from './htmlembedcommand';
12
- export type { HtmlEmbedConfig } from './htmlembedconfig';
13
- import './augmentation';
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module html-embed
7
+ */
8
+ export { default as HtmlEmbed } from './htmlembed';
9
+ export { default as HtmlEmbedEditing } from './htmlembedediting';
10
+ export { default as HtmlEmbedUI } from './htmlembedui';
11
+ export type { default as HtmlEmbedCommand } from './htmlembedcommand';
12
+ export type { HtmlEmbedConfig } from './htmlembedconfig';
13
+ import './augmentation';
package/src/index.js CHANGED
@@ -1,11 +1,11 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module html-embed
7
- */
8
- export { default as HtmlEmbed } from './htmlembed';
9
- export { default as HtmlEmbedEditing } from './htmlembedediting';
10
- export { default as HtmlEmbedUI } from './htmlembedui';
11
- import './augmentation';
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module html-embed
7
+ */
8
+ export { default as HtmlEmbed } from './htmlembed';
9
+ export { default as HtmlEmbedEditing } from './htmlembedediting';
10
+ export { default as HtmlEmbedUI } from './htmlembedui';
11
+ import './augmentation';