@akilli/editor-src 5.2.5 → 5.2.7
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/details/Details.js +3 -0
- package/details/DetailsDialog.js +13 -0
- package/i18n/de.js +2 -0
- package/package.json +1 -1
package/details/Details.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Base from '../base/Base.js';
|
|
2
|
+
import DetailsDialog from './DetailsDialog.js';
|
|
2
3
|
import DetailsFilter from './DetailsFilter.js';
|
|
3
4
|
import DetailsListener from './DetailsListener.js';
|
|
4
5
|
import Plugin from '../base/Plugin.js';
|
|
@@ -41,6 +42,7 @@ export default class Details extends Plugin {
|
|
|
41
42
|
TagGroup.TABLE,
|
|
42
43
|
TagGroup.VIDEO,
|
|
43
44
|
],
|
|
45
|
+
attributes: ['name'],
|
|
44
46
|
arbitrary: true,
|
|
45
47
|
deletable: true,
|
|
46
48
|
focusable: true,
|
|
@@ -56,6 +58,7 @@ export default class Details extends Plugin {
|
|
|
56
58
|
enter: TagName.P,
|
|
57
59
|
});
|
|
58
60
|
new DetailsListener(this.editor);
|
|
61
|
+
this.editor.dialogs.set(new DetailsDialog(this.editor, this.constructor.name));
|
|
59
62
|
this._command(TagName.DETAILS);
|
|
60
63
|
this._toolbar('Details');
|
|
61
64
|
this.editor.filters.add(new DetailsFilter(this.editor));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Dialog from '../base/Dialog.js';
|
|
2
|
+
|
|
3
|
+
export default class DetailsDialog extends Dialog {
|
|
4
|
+
/**
|
|
5
|
+
* @protected
|
|
6
|
+
* @return {void}
|
|
7
|
+
*/
|
|
8
|
+
_prepareForm() {
|
|
9
|
+
this.formCreator.addLegend(this._('Details')).addTextInput('name', this._('Name'), {
|
|
10
|
+
placeholder: this._('Insert name or leave empty to remove it'),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
package/i18n/de.js
CHANGED