@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.
- package/ckeditor5-metadata.json +2 -2
- package/{src → dist}/htmlembed.d.ts +2 -2
- package/{src → dist}/htmlembedcommand.d.ts +1 -1
- package/{src → dist}/htmlembedediting.d.ts +1 -1
- package/{src → dist}/htmlembedui.d.ts +1 -1
- package/dist/index-editor.css +165 -35
- package/dist/index.css +164 -56
- package/dist/index.css.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +24 -47
- package/build/html-embed.js +0 -5
- package/build/translations/af.js +0 -1
- package/build/translations/ar.js +0 -1
- package/build/translations/ast.js +0 -1
- package/build/translations/az.js +0 -1
- package/build/translations/be.js +0 -1
- package/build/translations/bg.js +0 -1
- package/build/translations/bn.js +0 -1
- package/build/translations/bs.js +0 -1
- package/build/translations/ca.js +0 -1
- package/build/translations/cs.js +0 -1
- package/build/translations/da.js +0 -1
- package/build/translations/de-ch.js +0 -1
- package/build/translations/de.js +0 -1
- package/build/translations/el.js +0 -1
- package/build/translations/en-au.js +0 -1
- package/build/translations/en-gb.js +0 -1
- package/build/translations/eo.js +0 -1
- package/build/translations/es-co.js +0 -1
- package/build/translations/es.js +0 -1
- package/build/translations/et.js +0 -1
- package/build/translations/eu.js +0 -1
- package/build/translations/fa.js +0 -1
- package/build/translations/fi.js +0 -1
- package/build/translations/fr.js +0 -1
- package/build/translations/gl.js +0 -1
- package/build/translations/gu.js +0 -1
- package/build/translations/he.js +0 -1
- package/build/translations/hi.js +0 -1
- package/build/translations/hr.js +0 -1
- package/build/translations/hu.js +0 -1
- package/build/translations/hy.js +0 -1
- package/build/translations/id.js +0 -1
- package/build/translations/it.js +0 -1
- package/build/translations/ja.js +0 -1
- package/build/translations/jv.js +0 -1
- package/build/translations/kk.js +0 -1
- package/build/translations/km.js +0 -1
- package/build/translations/kn.js +0 -1
- package/build/translations/ko.js +0 -1
- package/build/translations/ku.js +0 -1
- package/build/translations/lt.js +0 -1
- package/build/translations/lv.js +0 -1
- package/build/translations/ms.js +0 -1
- package/build/translations/nb.js +0 -1
- package/build/translations/ne.js +0 -1
- package/build/translations/nl.js +0 -1
- package/build/translations/no.js +0 -1
- package/build/translations/oc.js +0 -1
- package/build/translations/pl.js +0 -1
- package/build/translations/pt-br.js +0 -1
- package/build/translations/pt.js +0 -1
- package/build/translations/ro.js +0 -1
- package/build/translations/ru.js +0 -1
- package/build/translations/si.js +0 -1
- package/build/translations/sk.js +0 -1
- package/build/translations/sl.js +0 -1
- package/build/translations/sq.js +0 -1
- package/build/translations/sr-latn.js +0 -1
- package/build/translations/sr.js +0 -1
- package/build/translations/sv.js +0 -1
- package/build/translations/th.js +0 -1
- package/build/translations/ti.js +0 -1
- package/build/translations/tk.js +0 -1
- package/build/translations/tr.js +0 -1
- package/build/translations/tt.js +0 -1
- package/build/translations/ug.js +0 -1
- package/build/translations/uk.js +0 -1
- package/build/translations/ur.js +0 -1
- package/build/translations/uz.js +0 -1
- package/build/translations/vi.js +0 -1
- package/build/translations/zh-cn.js +0 -1
- package/build/translations/zh.js +0 -1
- package/lang/contexts.json +0 -9
- package/lang/translations/af.po +0 -40
- package/lang/translations/ar.po +0 -40
- package/lang/translations/ast.po +0 -40
- package/lang/translations/az.po +0 -40
- package/lang/translations/be.po +0 -40
- package/lang/translations/bg.po +0 -40
- package/lang/translations/bn.po +0 -40
- package/lang/translations/bs.po +0 -40
- package/lang/translations/ca.po +0 -40
- package/lang/translations/cs.po +0 -40
- package/lang/translations/da.po +0 -40
- package/lang/translations/de-ch.po +0 -40
- package/lang/translations/de.po +0 -40
- package/lang/translations/el.po +0 -40
- package/lang/translations/en-au.po +0 -40
- package/lang/translations/en-gb.po +0 -40
- package/lang/translations/en.po +0 -40
- package/lang/translations/eo.po +0 -40
- package/lang/translations/es-co.po +0 -40
- package/lang/translations/es.po +0 -40
- package/lang/translations/et.po +0 -40
- package/lang/translations/eu.po +0 -40
- package/lang/translations/fa.po +0 -40
- package/lang/translations/fi.po +0 -40
- package/lang/translations/fr.po +0 -40
- package/lang/translations/gl.po +0 -40
- package/lang/translations/gu.po +0 -40
- package/lang/translations/he.po +0 -40
- package/lang/translations/hi.po +0 -40
- package/lang/translations/hr.po +0 -40
- package/lang/translations/hu.po +0 -40
- package/lang/translations/hy.po +0 -40
- package/lang/translations/id.po +0 -40
- package/lang/translations/it.po +0 -40
- package/lang/translations/ja.po +0 -40
- package/lang/translations/jv.po +0 -40
- package/lang/translations/kk.po +0 -40
- package/lang/translations/km.po +0 -40
- package/lang/translations/kn.po +0 -40
- package/lang/translations/ko.po +0 -40
- package/lang/translations/ku.po +0 -40
- package/lang/translations/lt.po +0 -40
- package/lang/translations/lv.po +0 -40
- package/lang/translations/ms.po +0 -40
- package/lang/translations/nb.po +0 -40
- package/lang/translations/ne.po +0 -40
- package/lang/translations/nl.po +0 -40
- package/lang/translations/no.po +0 -40
- package/lang/translations/oc.po +0 -40
- package/lang/translations/pl.po +0 -40
- package/lang/translations/pt-br.po +0 -40
- package/lang/translations/pt.po +0 -40
- package/lang/translations/ro.po +0 -40
- package/lang/translations/ru.po +0 -40
- package/lang/translations/si.po +0 -40
- package/lang/translations/sk.po +0 -40
- package/lang/translations/sl.po +0 -40
- package/lang/translations/sq.po +0 -40
- package/lang/translations/sr-latn.po +0 -40
- package/lang/translations/sr.po +0 -40
- package/lang/translations/sv.po +0 -40
- package/lang/translations/th.po +0 -40
- package/lang/translations/ti.po +0 -40
- package/lang/translations/tk.po +0 -40
- package/lang/translations/tr.po +0 -40
- package/lang/translations/tt.po +0 -40
- package/lang/translations/ug.po +0 -40
- package/lang/translations/uk.po +0 -40
- package/lang/translations/ur.po +0 -40
- package/lang/translations/uz.po +0 -40
- package/lang/translations/vi.po +0 -40
- package/lang/translations/zh-cn.po +0 -40
- package/lang/translations/zh.po +0 -40
- package/src/augmentation.js +0 -5
- package/src/htmlembed.js +0 -38
- package/src/htmlembedcommand.js +0 -95
- package/src/htmlembedconfig.js +0 -5
- package/src/htmlembedediting.js +0 -347
- package/src/htmlembedui.js +0 -73
- package/src/index.js +0 -12
- package/theme/htmlembed.css +0 -68
- /package/{src → dist}/augmentation.d.ts +0 -0
- /package/{src → dist}/htmlembedconfig.d.ts +0 -0
- /package/{src → dist}/index.d.ts +0 -0
package/src/htmlembedui.js
DELETED
|
@@ -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';
|
package/theme/htmlembed.css
DELETED
|
@@ -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
|
/package/{src → dist}/index.d.ts
RENAMED
|
File without changes
|