widget.\n conversion.for('editingDowncast').elementToElement({\n model: 'avoindataSectionContent',\n view: (modelElement, { writer: viewWriter }) => {\n const div = viewWriter.createEditableElement('div', {\n class: 'avoindata-section-content',\n });\n return (0,ckeditor5_src_widget__WEBPACK_IMPORTED_MODULE_1__.toWidgetEditable)(div, viewWriter);\n },\n });\n\n\n\n // Extra converters for the older format ckeditor4 plugins\n conversion.for('upcast').elementToElement({\n model: 'avoindataSectionTitle',\n view: {\n name: 'h3',\n classes: 'avoindata-section__title',\n },\n });\n\n conversion.for('upcast').elementToElement({\n model: 'avoindataSectionContent',\n view: {\n name: 'div',\n classes: 'avoindata-section__content',\n },\n });\n }\n}\n\n\n//# sourceURL=webpack://CKEditor5.avoindataSection/./src/avoindataSection/avoindataSectionEditing.js?")},"./src/avoindataSection/avoindataSectionUI.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ AvoindataSectionUI)\n/* harmony export */ });\n/* harmony import */ var ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ckeditor5/src/core */ \"ckeditor5/src/core.js\");\n/* harmony import */ var ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ckeditor5/src/ui */ \"ckeditor5/src/ui.js\");\n/* harmony import */ var _avoindataSectionView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./avoindataSectionView */ \"./src/avoindataSection/avoindataSectionView.js\");\n/* harmony import */ var _icons_icon_section_svg_source__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../icons/icon-section.svg?source */ \"./icons/icon-section.svg?source\");\n/**\n * @file registers the avoindataSection toolbar button and binds functionality to it.\n */\n\n\n\n\n\n\nclass AvoindataSectionUI extends ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__.Plugin {\n static get requires() {\n return [ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_1__.ContextualBalloon];\n }\n\n init() {\n const editor = this.editor;\n // Create the balloon and the form view.\n this._balloon = editor.plugins.get(ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_1__.ContextualBalloon);\n this.formView = this._createFormView();\n const command = editor.commands.get('insertAvoindataSectionCommand');\n\n // This will register the avoindataSection toolbar button.\n editor.ui.componentFactory.add('avoindataSection', (locale) => {\n const buttonView = new ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_1__.ButtonView(locale);\n\n // Create the toolbar button.\n buttonView.set({\n label: editor.t('Avoindata Section widget'),\n icon: _icons_icon_section_svg_source__WEBPACK_IMPORTED_MODULE_3__,\n tooltip: true\n });\n\n // Bind the state of the button to the command.\n buttonView.bind('isOn', 'isEnabled').to(command, 'value', 'isEnabled');\n\n // Execute the command when the button is clicked (executed).\n /* this.listenTo(buttonView, 'execute', () =>\n editor.execute('insertAvoindataSectionCommand'),\n ); */\n\n // Show the UI on button click.\n this.listenTo(buttonView, 'execute', () => {\n this._showUI();\n });\n\n return buttonView;\n });\n }\n\n _createFormView() {\n const editor = this.editor;\n const formView = new _avoindataSectionView__WEBPACK_IMPORTED_MODULE_2__[\"default\"](editor.locale);\n\n // Execute the command after clicking the \"Save\" button.\n this.listenTo(formView, 'submit', () => {\n // Grab values from the input fields.\n const id = formView.idInputView.fieldView.element.value;\n\n editor.model.change(writer => {\n editor.execute('insertAvoindataSectionCommand', id);\n });\n\n // Hide the form view after submit.\n this._hideUI();\n });\n\n // Hide the form view after clicking the \"Cancel\" button.\n this.listenTo(formView, 'cancel', () => {\n this._hideUI();\n });\n\n // Hide the form view when clicking outside the balloon.\n (0,ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_1__.clickOutsideHandler)({\n emitter: formView,\n activator: () => this._balloon.visibleView === formView,\n contextElements: [this._balloon.view.element],\n callback: () => this._hideUI()\n });\n\n return formView;\n }\n\n _showUI() {\n const selection = this.editor.model.document.selection;\n\n this._balloon.add({\n view: this.formView,\n position: this._getBalloonPositionData()\n });\n\n const id = selection.getSelectedElement()?.getAttribute('avoindataSectionId') || '';\n this.formView.idInputView.fieldView.value = id;\n\n this.formView.focus();\n }\n\n _hideUI() {\n // Clear the input field values and reset the form.\n this.formView.idInputView.fieldView.value = '';\n this.formView.element.reset();\n\n this._balloon.remove(this.formView);\n\n // Focus the editing view after inserting the abbreviation so the user can start typing the content\n // right away and keep the editor focused.\n this.editor.editing.view.focus();\n }\n\n _getBalloonPositionData() {\n const view = this.editor.editing.view;\n const viewDocument = view.document;\n let target = null;\n\n // Set a target position by converting view selection range to DOM\n target = () => view.domConverter.viewRangeToDom(viewDocument.selection.getFirstRange());\n\n return {\n target\n };\n }\n}\n\n\n//# sourceURL=webpack://CKEditor5.avoindataSection/./src/avoindataSection/avoindataSectionUI.js?")},"./src/avoindataSection/avoindataSectionView.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ FormView)\n/* harmony export */ });\n/* harmony import */ var ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ckeditor5/src/ui */ \"ckeditor5/src/ui.js\");\n/* harmony import */ var ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ckeditor5/src/core */ \"ckeditor5/src/core.js\");\n\n\n\nclass FormView extends ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_0__.View {\n constructor(locale) {\n super(locale);\n\n this.heading = new ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_0__.LabelView(this.locale);\n this.heading.setTemplate({\n tag: 'div',\n attributes: {\n class: ['title']\n },\n children: ['Avoindata section']\n })\n\n this.idInputView = this._createInput('Id');\n\n this.saveButtonView = this._createButton('Save', null, 'btn btn-primary');\n // Submit type of the button will trigger the submit event on entire form when clicked\n // (see submitHandler() in render() below).\n this.saveButtonView.type = 'submit';\n\n this.cancelButtonView = this._createButton('Cancel', null, 'btn btn-secondary');\n\n // Delegate ButtonView#execute to FormView#cancel\n this.cancelButtonView.delegate('execute').to(this, 'cancel');\n\n this.childViews = this.createCollection([\n this.heading,\n this.idInputView,\n this.saveButtonView,\n this.cancelButtonView\n ]);\n\n this.setTemplate({\n tag: 'form',\n attributes: {\n class: ['ck', 'ck-reset_all-excluded', 'avoindata-section-id-form'],\n tabindex: '-1'\n },\n children: this.childViews\n });\n }\n\n render() {\n super.render();\n\n // Submit the form when the user clicked the save button or pressed enter in the input.\n (0,ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_0__.submitHandler)({\n view: this\n });\n }\n\n focus() {\n this.childViews.get(1).focus();\n }\n\n _createInput(label) {\n const labeledInput = new ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_0__.LabeledFieldView(this.locale, ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_0__.createLabeledInputText);\n\n labeledInput.label = label;\n\n return labeledInput;\n }\n\n _createButton(label, icon, className) {\n const button = new ckeditor5_src_ui__WEBPACK_IMPORTED_MODULE_0__.ButtonView();\n\n button.set({\n label,\n icon,\n tooltip: true,\n class: className,\n withText: true,\n });\n\n return button;\n }\n}\n\n\n//# sourceURL=webpack://CKEditor5.avoindataSection/./src/avoindataSection/avoindataSectionView.js?")},"./src/avoindataSection/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _avoindataSection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./avoindataSection */ "./src/avoindataSection/avoindataSection.js");\n/**\n * @file The build process always expects an index.js file. Anything exported\n * here will be recognized by CKEditor 5 as an available plugin. Multiple\n * plugins can be exported in this one file.\n *\n * I.e. this file\'s purpose is to make plugin(s) discoverable.\n */\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n AvoindataSection: _avoindataSection__WEBPACK_IMPORTED_MODULE_0__["default"],\n});\n\n\n//# sourceURL=webpack://CKEditor5.avoindataSection/./src/avoindataSection/index.js?')},"./src/avoindataSection/insertAvoindataSectionCommand.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ InsertAvoindataSectionCommand)\n/* harmony export */ });\n/* harmony import */ var ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ckeditor5/src/core */ \"ckeditor5/src/core.js\");\n/**\n * @file defines InsertAvoindataSectionCommand, which is executed when the avoindataSection\n * toolbar button is pressed.\n */\n\n\n\nclass InsertAvoindataSectionCommand extends ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__.Command {\n execute(id) {\n const { model } = this.editor;\n\n model.change((writer) => {\n const existingElement = writer.model.document.selection?.getSelectedElement();\n\n if (existingElement && existingElement.name == 'avoindataSection') {\n writer.setAttribute('avoindataSectionId', id, existingElement);\n } else {\n // Insert
* at the current selection position\n // in a way that will result in creating a valid model structure.\n const avoindataSection = createAvoindataSection(writer, id);\n model.insertContent(avoindataSection);\n const selection = writer.createSelection(avoindataSection.getChild(0), 'in');\n writer.setSelection(selection)\n }\n });\n }\n\n refresh() {\n const { model } = this.editor;\n const { selection } = model.document;\n\n // Determine if the cursor (selection) is in a position where adding a\n // avoindataSection is permitted. This is based on the schema of the model(s)\n // currently containing the cursor.\n const allowedIn = model.schema.findAllowedParent(\n selection.getFirstPosition(),\n 'avoindataSection',\n );\n\n // If the cursor is not in a location where a avoindataSection can be added, return\n // null so the addition doesn't happen.\n this.isEnabled = allowedIn !== null;\n }\n}\n\nfunction createAvoindataSection(writer, id) {\n // Create instances of the elements registered with the editor in avoindataexpanderediting.js.\n const avoindataSection = writer.createElement('avoindataSection', { avoindataSectionId: id });\n const avoindataSectionTitle = writer.createElement('avoindataSectionTitle');\n const avoindataSectionContent = writer.createElement('avoindataSectionContent');\n\n // Append the title and content elements to the avoindataSection, which matches\n // the parent/child relationship as defined in their schemas.\n writer.append(avoindataSectionTitle, avoindataSection);\n writer.append(avoindataSectionContent, avoindataSection);\n\n // The text content will automatically be wrapped in a\n // `
`.\n const title = writer.createElement('paragraph');\n writer.insertText('Title', title, 0);\n writer.append(title, avoindataSectionTitle);\n const content = writer.createElement('paragraph');\n writer.insertText('Content', content, 0);\n writer.append(content, avoindataSectionContent);\n\n // Return the element to be added to the editor.\n return avoindataSection;\n}\n\n\n//# sourceURL=webpack://CKEditor5.avoindataSection/./src/avoindataSection/insertAvoindataSectionCommand.js?")},"./icons/icon-section.svg?source":module=>{"use strict";eval('module.exports = "\\n";\n\n//# sourceURL=webpack://CKEditor5.avoindataSection/./icons/icon-section.svg?')},"ckeditor5/src/core.js":(module,__unused_webpack_exports,__webpack_require__)=>{eval('module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ "dll-reference CKEditor5.dll"))("./src/core.js");\n\n//# sourceURL=webpack://CKEditor5.avoindataSection/delegated_./core.js_from_dll-reference_CKEditor5.dll?')},"ckeditor5/src/ui.js":(module,__unused_webpack_exports,__webpack_require__)=>{eval('module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ "dll-reference CKEditor5.dll"))("./src/ui.js");\n\n//# sourceURL=webpack://CKEditor5.avoindataSection/delegated_./ui.js_from_dll-reference_CKEditor5.dll?')},"ckeditor5/src/widget.js":(module,__unused_webpack_exports,__webpack_require__)=>{eval('module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ "dll-reference CKEditor5.dll"))("./src/widget.js");\n\n//# sourceURL=webpack://CKEditor5.avoindataSection/delegated_./widget.js_from_dll-reference_CKEditor5.dll?')},"dll-reference CKEditor5.dll":e=>{"use strict";e.exports=CKEditor5.dll}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var t=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](t,t.exports,__webpack_require__),t.exports}__webpack_require__.d=(e,n)=>{for(var t in n)__webpack_require__.o(n,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},__webpack_require__.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__("./src/avoindataSection/index.js");return __webpack_exports__=__webpack_exports__.default,__webpack_exports__})()));
\ No newline at end of file
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CKEditor5=t():(e.CKEditor5=e.CKEditor5||{},e.CKEditor5.avoindataSection=t())}(self,(()=>(()=>{var e={"ckeditor5/src/core.js":(e,t,i)=>{e.exports=i("dll-reference CKEditor5.dll")("./src/core.js")},"ckeditor5/src/ui.js":(e,t,i)=>{e.exports=i("dll-reference CKEditor5.dll")("./src/ui.js")},"ckeditor5/src/widget.js":(e,t,i)=>{e.exports=i("dll-reference CKEditor5.dll")("./src/widget.js")},"dll-reference CKEditor5.dll":e=>{"use strict";e.exports=CKEditor5.dll}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,i),a.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{"use strict";i.d(n,{default:()=>r});var e=i("ckeditor5/src/core.js"),t=i("ckeditor5/src/widget.js");class o extends e.Command{execute(e){const{model:t}=this.editor;t.change((i=>{const n=i.model.document.selection?.getSelectedElement();if(n&&"avoindataSection"==n.name)i.setAttribute("avoindataSectionId",e,n);else{const n=function(e,t){const i=e.createElement("avoindataSection",{avoindataSectionId:t}),n=e.createElement("avoindataSectionTitle"),o=e.createElement("avoindataSectionContent");e.append(n,i),e.append(o,i);const a=e.createElement("paragraph");e.insertText("Title",a,0),e.append(a,n);const s=e.createElement("paragraph");return e.insertText("Content",s,0),e.append(s,o),i}(i,e);t.insertContent(n);const o=i.createSelection(n.getChild(0),"in");i.setSelection(o)}}))}refresh(){const{model:e}=this.editor,{selection:t}=e.document,i=e.schema.findAllowedParent(t.getFirstPosition(),"avoindataSection");this.isEnabled=null!==i}}class a extends e.Plugin{static get requires(){return[t.Widget]}init(){this._defineSchema(),this._defineConverters(),this.editor.commands.add("insertAvoindataSectionCommand",new o(this.editor))}_defineSchema(){const e=this.editor.model.schema;e.register("avoindataSection",{isObject:!0,allowWhere:"$block",allowAttributes:["avoindataSectionId"],allowContentOf:"$block"}),e.register("avoindataSectionTitle",{isLimit:!0,allowIn:"avoindataSection",allowContentOf:"$root"}),e.register("avoindataSectionContent",{isLimit:!0,allowIn:"avoindataSection",allowContentOf:"$root"}),e.addChildCheck(((e,t)=>{if((e.endsWith("avoindataSectionContent")||e.endsWith("avoindataSectionTitle"))&&"avoindataSection"===t.name)return!1}))}_defineConverters(){const{conversion:e}=this.editor;e.for("upcast").elementToElement({model:(e,{writer:t})=>t.createElement("avoindataSection",{avoindataSectionId:e.getAttribute("id")}),view:{name:"div",classes:"avoindata-section",attributes:["id"]}}),e.for("upcast").elementToElement({model:"avoindataSectionTitle",view:{name:"div",classes:"avoindata-section-title"}}),e.for("upcast").elementToElement({model:"avoindataSectionContent",view:{name:"div",classes:"avoindata-section-content"}}),e.for("dataDowncast").elementToElement({model:{name:"avoindataSection",attributes:["avoindataSectionId"]},view:(e,{writer:t})=>t.createContainerElement("div",{class:"avoindata-section",id:e.getAttribute("avoindataSectionId")})}),e.for("dataDowncast").elementToElement({model:"avoindataSectionTitle",view:{name:"div",classes:"avoindata-section-title"}}),e.for("dataDowncast").elementToElement({model:"avoindataSectionContent",view:{name:"div",classes:"avoindata-section-content"}}),e.for("editingDowncast").elementToElement({model:{name:"avoindataSection",attributes:["avoindataSectionId"]},view:(e,{writer:i})=>{const n=i.createContainerElement("div",{class:"avoindata-section",id:e.getAttribute("avoindataSectionId")});return(0,t.toWidget)(n,i,{label:"Avoindata Section widget"})}}),e.for("editingDowncast").elementToElement({model:"avoindataSectionTitle",view:(e,{writer:i})=>{const n=i.createEditableElement("div",{class:"avoindata-section-title"});return(0,t.toWidgetEditable)(n,i)}}),e.for("editingDowncast").elementToElement({model:"avoindataSectionContent",view:(e,{writer:i})=>{const n=i.createEditableElement("div",{class:"avoindata-section-content"});return(0,t.toWidgetEditable)(n,i)}}),e.for("upcast").elementToElement({model:"avoindataSectionTitle",view:{name:"h3",classes:"avoindata-section__title"}}),e.for("upcast").elementToElement({model:"avoindataSectionContent",view:{name:"div",classes:"avoindata-section__content"}})}}var s=i("ckeditor5/src/ui.js");class d extends s.View{constructor(e){super(e),this.heading=new s.LabelView(this.locale),this.heading.setTemplate({tag:"div",attributes:{class:["title"]},children:["Avoindata section"]}),this.idInputView=this._createInput("Id"),this.saveButtonView=this._createButton("Save",null,"btn btn-primary"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton("Cancel",null,"btn btn-secondary"),this.cancelButtonView.delegate("execute").to(this,"cancel"),this.childViews=this.createCollection([this.heading,this.idInputView,this.saveButtonView,this.cancelButtonView]),this.setTemplate({tag:"form",attributes:{class:["ck","ck-reset_all-excluded","avoindata-section-id-form"],tabindex:"-1"},children:this.childViews})}render(){super.render(),(0,s.submitHandler)({view:this})}focus(){this.childViews.get(1).focus()}_createInput(e){const t=new s.LabeledFieldView(this.locale,s.createLabeledInputText);return t.label=e,t}_createButton(e,t,i){const n=new s.ButtonView;return n.set({label:e,icon:t,tooltip:!0,class:i,withText:!0}),n}}class l extends e.Plugin{static get requires(){return[s.ContextualBalloon]}init(){const e=this.editor;this._balloon=e.plugins.get(s.ContextualBalloon),this.formView=this._createFormView();const t=e.commands.get("insertAvoindataSectionCommand");e.ui.componentFactory.add("avoindataSection",(i=>{const n=new s.ButtonView(i);return n.set({label:e.t("Avoindata Section"),icon:'\n',tooltip:!0}),n.bind("isOn","isEnabled").to(t,"value","isEnabled"),this.listenTo(n,"execute",(()=>{this._showUI()})),n}))}_createFormView(){const e=this.editor,t=new d(e.locale);return this.listenTo(t,"submit",(()=>{const i=t.idInputView.fieldView.element.value;e.model.change((t=>{e.execute("insertAvoindataSectionCommand",i)})),this._hideUI()})),this.listenTo(t,"cancel",(()=>{this._hideUI()})),(0,s.clickOutsideHandler)({emitter:t,activator:()=>this._balloon.visibleView===t,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()}),t}_showUI(){const e=this.editor.model.document.selection;this._balloon.add({view:this.formView,position:this._getBalloonPositionData()});const t=e.getSelectedElement()?.getAttribute("avoindataSectionId")||"";this.formView.idInputView.fieldView.value=t,this.formView.focus()}_hideUI(){this.formView.idInputView.fieldView.value="",this.formView.element.reset(),this._balloon.remove(this.formView),this.editor.editing.view.focus()}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document;let i=null;return i=()=>e.domConverter.viewRangeToDom(t.selection.getFirstRange()),{target:i}}}class c extends e.Plugin{static get requires(){return[a,l]}}const r={AvoindataSection:c}})(),n=n.default})()));
\ No newline at end of file
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/js/externalLink.js b/drupal/modules/avoindata-ckeditor5-plugins/js/externalLink.js
deleted file mode 100644
index 8ae19068f8..0000000000
--- a/drupal/modules/avoindata-ckeditor5-plugins/js/externalLink.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.CKEditor5=n():(e.CKEditor5=e.CKEditor5||{},e.CKEditor5.externalLink=n())}(self,(()=>(()=>{var __webpack_modules__={"./src/externalLink/externalLink.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ExternalLink)\n/* harmony export */ });\n/* harmony import */ var ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ckeditor5/src/core */ \"ckeditor5/src/core.js\");\n\n\nclass ExternalLink extends ckeditor5_src_core__WEBPACK_IMPORTED_MODULE_0__.Plugin {\n init() {\n const { conversion } = this.editor;\n\n // Upcast Converter for the old ckeditor4 plugin format\n conversion.for('upcast').elementToAttribute({\n model: 'linkIsExternal',\n view: {\n name: 'a',\n classes: ['external'],\n attributes: ['aria-label', 'target'],\n },\n });\n\n // Extra consumption for the leftover svg icon\n conversion.for('upcast').add(dispatcher => {\n // Look for every view svg element.\n dispatcher.on('element:svg', (evt, data, conversionApi) => {\n // Get all the necessary items from the conversion API object.\n const {\n consumable\n } = conversionApi;\n\n // Get view item from data object.\n const { viewItem } = data;\n\n // Define elements consumables.\n const svg = { name: 'svg', attributes: ['viewBox'] };\n const use = { name: 'use', attributes: ['href'] };\n\n // Tests if the view element can be consumed.\n if (!consumable.test(viewItem, svg)) {\n return;\n }\n\n // Check if there is only one child.\n if (viewItem.childCount !== 1) {\n return;\n }\n\n // Get the first child element.\n const firstChildItem = viewItem.getChild(0);\n\n // Check if the first element is a div.\n if (!firstChildItem.is('element', 'use')) {\n return;\n }\n\n // Tests if the first child element can be consumed.\n if (!consumable.test(firstChildItem, use)) {\n return;\n }\n\n // If a use tag inside a svg has the string 'avoindata_external-link' within the href\n // we can assume it's the old ckeditor4 plugin format and simply get rid of them\n if (firstChildItem?.getAttribute('href')?.includes('avoindata_external-link')) {\n // Consume the main outer wrapper element.\n consumable.consume(viewItem, svg);\n // Consume the inner wrapper element.\n consumable.consume(firstChildItem, use);\n }\n });\n });\n /*\n const editor = this.editor;\n\n // `listenTo()` and `editor` are available thanks to `Plugin`.\n // By using `listenTo()` you will ensure that the listener is removed when\n // the plugin is destroyed.\n this.listenTo(editor.data, 'ready', () => {\n const linkCommand = editor.commands.get('link');\n const { selection } = editor.model.document;\n\n let linkCommandExecuting = false;\n\n linkCommand.on('execute', (evt, args) => {\n const linkIsExternal = args[1]['linkIsExternal']\n\n if (linkIsExternal) {\n if (linkCommandExecuting) {\n linkCommandExecuting = false;\n return;\n }\n\n // If the additional attribute was passed, we stop the default execution\n // of the LinkCommand. We're going to create Model#change() block for undo\n // and execute the LinkCommand together with setting the extra attribute.\n evt.stop();\n\n // Prevent infinite recursion by keeping records of when link command is\n // being executed by this function.\n linkCommandExecuting = true;\n\n // Wrapping the original command execution in a model.change() block to make sure there's a single undo step\n // when the extra attribute is added.\n\n editor.model.change(writer => {\n editor.execute('link', ...args);\n const link = selection.getLastPosition().nodeBefore;\n // writer.insertElement('avoindataExternalLink', selection.getLastPosition())\n });\n }\n })\n });\n */\n }\n\n static get pluginName() {\n return 'ExternalLink';\n }\n}\n\n\n//# sourceURL=webpack://CKEditor5.externalLink/./src/externalLink/externalLink.js?")},"./src/externalLink/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _externalLink__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./externalLink */ "./src/externalLink/externalLink.js");\n/**\n * @file The build process always expects an index.js file. Anything exported\n * here will be recognized by CKEditor 5 as an available plugin. Multiple\n * plugins can be exported in this one file.\n *\n * I.e. this file\'s purpose is to make plugin(s) discoverable.\n */\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n ExternalLink: _externalLink__WEBPACK_IMPORTED_MODULE_0__["default"],\n});\n\n\n//# sourceURL=webpack://CKEditor5.externalLink/./src/externalLink/index.js?')},"ckeditor5/src/core.js":(module,__unused_webpack_exports,__webpack_require__)=>{eval('module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ "dll-reference CKEditor5.dll"))("./src/core.js");\n\n//# sourceURL=webpack://CKEditor5.externalLink/delegated_./core.js_from_dll-reference_CKEditor5.dll?')},"dll-reference CKEditor5.dll":e=>{"use strict";e.exports=CKEditor5.dll}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var t=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](t,t.exports,__webpack_require__),t.exports}__webpack_require__.d=(e,n)=>{for(var t in n)__webpack_require__.o(n,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},__webpack_require__.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__("./src/externalLink/index.js");return __webpack_exports__=__webpack_exports__.default,__webpack_exports__})()));
\ No newline at end of file
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/package-lock.json b/drupal/modules/avoindata-ckeditor5-plugins/package-lock.json
index e7f18df65b..5693d663b9 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/package-lock.json
+++ b/drupal/modules/avoindata-ckeditor5-plugins/package-lock.json
@@ -10,7 +10,6 @@
"license": "GPL-2.0-or-later",
"devDependencies": {
"@ckeditor/ckeditor5-dev-utils": "^30.0.0",
- "@ckeditor/ckeditor5-link": "^39.0.1",
"ckeditor5": "~34.1.0",
"file-loader": "^6.2.0",
"raw-loader": "^4.0.2",
@@ -385,21 +384,6 @@
"npm": ">=5.7.1"
}
},
- "node_modules/@ckeditor/ckeditor5-core": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-core/-/ckeditor5-core-39.0.1.tgz",
- "integrity": "sha512-3hva3sRdDS2TLDhQNKgnJmpdXhuaod5tooDI/vnaiK+kduqy3nPuWI0qHtFpMhe7dlQWPZSI9ZhS/7cfFQ4CUg==",
- "dev": true,
- "dependencies": {
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "lodash-es": "4.17.21"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
"node_modules/@ckeditor/ckeditor5-dev-utils": {
"version": "30.5.0",
"resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-dev-utils/-/ckeditor5-dev-utils-30.5.0.tgz",
@@ -551,20 +535,6 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
- "node_modules/@ckeditor/ckeditor5-engine": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-39.0.1.tgz",
- "integrity": "sha512-QWyx1vO7+UO3rVIx9o1M7q05ghu1T+E4ugnzlcjLx+TiRLBH280M5RmxZ5gE8HjTSIabGDK1M0kmskL+wl2nDw==",
- "dev": true,
- "dependencies": {
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "lodash-es": "4.17.21"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
"node_modules/@ckeditor/ckeditor5-enter": {
"version": "34.2.0",
"resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-enter/-/ckeditor5-enter-34.2.0.tgz",
@@ -638,174 +608,6 @@
"npm": ">=5.7.1"
}
},
- "node_modules/@ckeditor/ckeditor5-link": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-link/-/ckeditor5-link-39.0.1.tgz",
- "integrity": "sha512-P9ZO7JihRhVUKyvE0rcBjEwlN4ZKFpBCeWimL5yM05L047FNb5yXQecmQfMDDpgYQl3Ggsm07QuWo/uG/0j/mQ==",
- "dev": true,
- "dependencies": {
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "ckeditor5": "39.0.1",
- "lodash-es": "4.17.21"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
- "node_modules/@ckeditor/ckeditor5-link/node_modules/@ckeditor/ckeditor5-clipboard": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-clipboard/-/ckeditor5-clipboard-39.0.1.tgz",
- "integrity": "sha512-OIlIvsiz6YTZM8o1Y1zG9eW9rUx06Bs3rMbMv37kNN1vq145D9h0OQt0iPKw1eXAG387Sk+SWZhO+Um+/O3eGw==",
- "dev": true,
- "dependencies": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "@ckeditor/ckeditor5-widget": "39.0.1",
- "lodash-es": "4.17.21"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
- "node_modules/@ckeditor/ckeditor5-link/node_modules/@ckeditor/ckeditor5-enter": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-enter/-/ckeditor5-enter-39.0.1.tgz",
- "integrity": "sha512-4gF0CFbEgZowQGmcyKP9KKBKOk67bdQIP5y71QvDgP6rUdbOQ5NDAS3FKis6a2Aubhtg92BO4QC6tZADPiW3hA==",
- "dev": true,
- "dependencies": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
- "node_modules/@ckeditor/ckeditor5-link/node_modules/@ckeditor/ckeditor5-paragraph": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-paragraph/-/ckeditor5-paragraph-39.0.1.tgz",
- "integrity": "sha512-zKYtpka2X8uR6bTiCXecwl86XKQ8ngk7Hm3UkmptDSfBDOp9PpFCeA3i8m1soFvT2OcdxQYbuAcd9TwoV/HY0g==",
- "dev": true,
- "dependencies": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
- "node_modules/@ckeditor/ckeditor5-link/node_modules/@ckeditor/ckeditor5-select-all": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-select-all/-/ckeditor5-select-all-39.0.1.tgz",
- "integrity": "sha512-Q4BwezfYmZEwODecoxXc2+2UNUkx/Gu5n7jZH/2kKNBVFwb3iVIun9tj5Q1+093FKjmLA46maYsG5HIG6eArTg==",
- "dev": true,
- "dependencies": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
- "node_modules/@ckeditor/ckeditor5-link/node_modules/@ckeditor/ckeditor5-typing": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-typing/-/ckeditor5-typing-39.0.1.tgz",
- "integrity": "sha512-bfMGH3IKj8LdhzfMpfOFUlnCPkpGQhl1HN2oF2g7EViOfuDKM4A2GboUIEqRP2C3tkwtHK5zM55Rdbd71DAQPQ==",
- "dev": true,
- "dependencies": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "lodash-es": "4.17.21"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
- "node_modules/@ckeditor/ckeditor5-link/node_modules/@ckeditor/ckeditor5-undo": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-undo/-/ckeditor5-undo-39.0.1.tgz",
- "integrity": "sha512-fgI5zNylzuiT2EitHm9ZVaAXB27JxOmONe51tSe9aUQoUkFLHau0HJfTNpKgHQTEPXMxhUPzH09xvj7QEc94Pg==",
- "dev": true,
- "dependencies": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
- "node_modules/@ckeditor/ckeditor5-link/node_modules/@ckeditor/ckeditor5-upload": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-upload/-/ckeditor5-upload-39.0.1.tgz",
- "integrity": "sha512-VVVWErIHRnw5kw00t8OYLxHDgSE1ywtoy/Zih0GJVxe882jIfajPj7KdZUjylfZuPeQnp1kAIpoe+WX3scvxFQ==",
- "dev": true,
- "dependencies": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
- "node_modules/@ckeditor/ckeditor5-link/node_modules/@ckeditor/ckeditor5-widget": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-widget/-/ckeditor5-widget-39.0.1.tgz",
- "integrity": "sha512-rd4ojJcdZQJttrrDogycDa+sb/rtKu9sU7G0+QEoJZXD25WjxIEgjyOoIqfv2UZZrZDX/0u8dviGhPbcbQEEnw==",
- "dev": true,
- "dependencies": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-enter": "39.0.1",
- "@ckeditor/ckeditor5-typing": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "lodash-es": "4.17.21"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
- "node_modules/@ckeditor/ckeditor5-link/node_modules/ckeditor5": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/ckeditor5/-/ckeditor5-39.0.1.tgz",
- "integrity": "sha512-KU6P0U9HQdsj7YBNZyG72ii+LNjIuWqxwdhlcd+QN11urQSDzoC6OjnqtDZ2Q3dQvwYf2aN9kDwUA9ElQ1krIg==",
- "dev": true,
- "dependencies": {
- "@ckeditor/ckeditor5-clipboard": "39.0.1",
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-enter": "39.0.1",
- "@ckeditor/ckeditor5-paragraph": "39.0.1",
- "@ckeditor/ckeditor5-select-all": "39.0.1",
- "@ckeditor/ckeditor5-typing": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "@ckeditor/ckeditor5-undo": "39.0.1",
- "@ckeditor/ckeditor5-upload": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "@ckeditor/ckeditor5-watchdog": "39.0.1",
- "@ckeditor/ckeditor5-widget": "39.0.1"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
"node_modules/@ckeditor/ckeditor5-paragraph": {
"version": "34.2.0",
"resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-paragraph/-/ckeditor5-paragraph-34.2.0.tgz",
@@ -1026,24 +828,6 @@
"npm": ">=5.7.1"
}
},
- "node_modules/@ckeditor/ckeditor5-ui": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-ui/-/ckeditor5-ui-39.0.1.tgz",
- "integrity": "sha512-6mBZNfMVSjyNb3HHyjJFwrR2rvmTuH1JSc+ebuulw5knYQmDaeCaS4tiYmOVcGGz/WcrAYRQAtSGrfZmuLesMQ==",
- "dev": true,
- "dependencies": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "color-convert": "2.0.1",
- "color-parse": "1.4.2",
- "lodash-es": "4.17.21",
- "vanilla-colorful": "0.7.2"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
"node_modules/@ckeditor/ckeditor5-undo": {
"version": "34.2.0",
"resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-undo/-/ckeditor5-undo-34.2.0.tgz",
@@ -1190,32 +974,6 @@
"npm": ">=5.7.1"
}
},
- "node_modules/@ckeditor/ckeditor5-utils": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-utils/-/ckeditor5-utils-39.0.1.tgz",
- "integrity": "sha512-lQ+1h4FgUScEdk547uCzfdvajFigVt4u0mRw1m9TtJ3B2GiatwRvst8TZEuWl8aFrIHjQ/gho66QIElJi/6+CA==",
- "dev": true,
- "dependencies": {
- "lodash-es": "4.17.21"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
- "node_modules/@ckeditor/ckeditor5-watchdog": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-watchdog/-/ckeditor5-watchdog-39.0.1.tgz",
- "integrity": "sha512-f5Uo0RdcbeKGs0gmBm8Y8c+Z9YgcjqX7ai4vdcw8HIEc0vCeEanPt816V53nLZ3LbPgez8LeWluR7VlzoxKO+g==",
- "dev": true,
- "dependencies": {
- "lodash-es": "4.17.21"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=5.7.1"
- }
- },
"node_modules/@ckeditor/ckeditor5-widget": {
"version": "34.2.0",
"resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-widget/-/ckeditor5-widget-34.2.0.tgz",
@@ -2140,15 +1898,6 @@
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
- "node_modules/color-parse": {
- "version": "1.4.2",
- "resolved": "https://registry.npmjs.org/color-parse/-/color-parse-1.4.2.tgz",
- "integrity": "sha512-RI7s49/8yqDj3fECFZjUI1Yi0z/Gq1py43oNJivAIIDSyJiOZLfYCRQEgn8HEVAj++PcRe8AnL2XF0fRJ3BTnA==",
- "dev": true,
- "dependencies": {
- "color-name": "^1.0.0"
- }
- },
"node_modules/colord": {
"version": "2.9.3",
"resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz",
@@ -5057,12 +4806,6 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"dev": true
},
- "node_modules/vanilla-colorful": {
- "version": "0.7.2",
- "resolved": "https://registry.npmjs.org/vanilla-colorful/-/vanilla-colorful-0.7.2.tgz",
- "integrity": "sha512-z2YZusTFC6KnLERx1cgoIRX2CjPRP0W75N+3CC6gbvdX5Ch47rZkEMGO2Xnf+IEmi3RiFLxS18gayMA27iU7Kg==",
- "dev": true
- },
"node_modules/watchpack": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
@@ -5577,17 +5320,6 @@
}
}
},
- "@ckeditor/ckeditor5-core": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-core/-/ckeditor5-core-39.0.1.tgz",
- "integrity": "sha512-3hva3sRdDS2TLDhQNKgnJmpdXhuaod5tooDI/vnaiK+kduqy3nPuWI0qHtFpMhe7dlQWPZSI9ZhS/7cfFQ4CUg==",
- "dev": true,
- "requires": {
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "lodash-es": "4.17.21"
- }
- },
"@ckeditor/ckeditor5-dev-utils": {
"version": "30.5.0",
"resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-dev-utils/-/ckeditor5-dev-utils-30.5.0.tgz",
@@ -5703,16 +5435,6 @@
}
}
},
- "@ckeditor/ckeditor5-engine": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-39.0.1.tgz",
- "integrity": "sha512-QWyx1vO7+UO3rVIx9o1M7q05ghu1T+E4ugnzlcjLx+TiRLBH280M5RmxZ5gE8HjTSIabGDK1M0kmskL+wl2nDw==",
- "dev": true,
- "requires": {
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "lodash-es": "4.17.21"
- }
- },
"@ckeditor/ckeditor5-enter": {
"version": "34.2.0",
"resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-enter/-/ckeditor5-enter-34.2.0.tgz",
@@ -5768,136 +5490,6 @@
}
}
},
- "@ckeditor/ckeditor5-link": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-link/-/ckeditor5-link-39.0.1.tgz",
- "integrity": "sha512-P9ZO7JihRhVUKyvE0rcBjEwlN4ZKFpBCeWimL5yM05L047FNb5yXQecmQfMDDpgYQl3Ggsm07QuWo/uG/0j/mQ==",
- "dev": true,
- "requires": {
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "ckeditor5": "39.0.1",
- "lodash-es": "4.17.21"
- },
- "dependencies": {
- "@ckeditor/ckeditor5-clipboard": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-clipboard/-/ckeditor5-clipboard-39.0.1.tgz",
- "integrity": "sha512-OIlIvsiz6YTZM8o1Y1zG9eW9rUx06Bs3rMbMv37kNN1vq145D9h0OQt0iPKw1eXAG387Sk+SWZhO+Um+/O3eGw==",
- "dev": true,
- "requires": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "@ckeditor/ckeditor5-widget": "39.0.1",
- "lodash-es": "4.17.21"
- }
- },
- "@ckeditor/ckeditor5-enter": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-enter/-/ckeditor5-enter-39.0.1.tgz",
- "integrity": "sha512-4gF0CFbEgZowQGmcyKP9KKBKOk67bdQIP5y71QvDgP6rUdbOQ5NDAS3FKis6a2Aubhtg92BO4QC6tZADPiW3hA==",
- "dev": true,
- "requires": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1"
- }
- },
- "@ckeditor/ckeditor5-paragraph": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-paragraph/-/ckeditor5-paragraph-39.0.1.tgz",
- "integrity": "sha512-zKYtpka2X8uR6bTiCXecwl86XKQ8ngk7Hm3UkmptDSfBDOp9PpFCeA3i8m1soFvT2OcdxQYbuAcd9TwoV/HY0g==",
- "dev": true,
- "requires": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1"
- }
- },
- "@ckeditor/ckeditor5-select-all": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-select-all/-/ckeditor5-select-all-39.0.1.tgz",
- "integrity": "sha512-Q4BwezfYmZEwODecoxXc2+2UNUkx/Gu5n7jZH/2kKNBVFwb3iVIun9tj5Q1+093FKjmLA46maYsG5HIG6eArTg==",
- "dev": true,
- "requires": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1"
- }
- },
- "@ckeditor/ckeditor5-typing": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-typing/-/ckeditor5-typing-39.0.1.tgz",
- "integrity": "sha512-bfMGH3IKj8LdhzfMpfOFUlnCPkpGQhl1HN2oF2g7EViOfuDKM4A2GboUIEqRP2C3tkwtHK5zM55Rdbd71DAQPQ==",
- "dev": true,
- "requires": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "lodash-es": "4.17.21"
- }
- },
- "@ckeditor/ckeditor5-undo": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-undo/-/ckeditor5-undo-39.0.1.tgz",
- "integrity": "sha512-fgI5zNylzuiT2EitHm9ZVaAXB27JxOmONe51tSe9aUQoUkFLHau0HJfTNpKgHQTEPXMxhUPzH09xvj7QEc94Pg==",
- "dev": true,
- "requires": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1"
- }
- },
- "@ckeditor/ckeditor5-upload": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-upload/-/ckeditor5-upload-39.0.1.tgz",
- "integrity": "sha512-VVVWErIHRnw5kw00t8OYLxHDgSE1ywtoy/Zih0GJVxe882jIfajPj7KdZUjylfZuPeQnp1kAIpoe+WX3scvxFQ==",
- "dev": true,
- "requires": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1"
- }
- },
- "@ckeditor/ckeditor5-widget": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-widget/-/ckeditor5-widget-39.0.1.tgz",
- "integrity": "sha512-rd4ojJcdZQJttrrDogycDa+sb/rtKu9sU7G0+QEoJZXD25WjxIEgjyOoIqfv2UZZrZDX/0u8dviGhPbcbQEEnw==",
- "dev": true,
- "requires": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-enter": "39.0.1",
- "@ckeditor/ckeditor5-typing": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "lodash-es": "4.17.21"
- }
- },
- "ckeditor5": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/ckeditor5/-/ckeditor5-39.0.1.tgz",
- "integrity": "sha512-KU6P0U9HQdsj7YBNZyG72ii+LNjIuWqxwdhlcd+QN11urQSDzoC6OjnqtDZ2Q3dQvwYf2aN9kDwUA9ElQ1krIg==",
- "dev": true,
- "requires": {
- "@ckeditor/ckeditor5-clipboard": "39.0.1",
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-engine": "39.0.1",
- "@ckeditor/ckeditor5-enter": "39.0.1",
- "@ckeditor/ckeditor5-paragraph": "39.0.1",
- "@ckeditor/ckeditor5-select-all": "39.0.1",
- "@ckeditor/ckeditor5-typing": "39.0.1",
- "@ckeditor/ckeditor5-ui": "39.0.1",
- "@ckeditor/ckeditor5-undo": "39.0.1",
- "@ckeditor/ckeditor5-upload": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "@ckeditor/ckeditor5-watchdog": "39.0.1",
- "@ckeditor/ckeditor5-widget": "39.0.1"
- }
- }
- }
- },
"@ckeditor/ckeditor5-paragraph": {
"version": "34.2.0",
"resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-paragraph/-/ckeditor5-paragraph-34.2.0.tgz",
@@ -6064,20 +5656,6 @@
}
}
},
- "@ckeditor/ckeditor5-ui": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-ui/-/ckeditor5-ui-39.0.1.tgz",
- "integrity": "sha512-6mBZNfMVSjyNb3HHyjJFwrR2rvmTuH1JSc+ebuulw5knYQmDaeCaS4tiYmOVcGGz/WcrAYRQAtSGrfZmuLesMQ==",
- "dev": true,
- "requires": {
- "@ckeditor/ckeditor5-core": "39.0.1",
- "@ckeditor/ckeditor5-utils": "39.0.1",
- "color-convert": "2.0.1",
- "color-parse": "1.4.2",
- "lodash-es": "4.17.21",
- "vanilla-colorful": "0.7.2"
- }
- },
"@ckeditor/ckeditor5-undo": {
"version": "34.2.0",
"resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-undo/-/ckeditor5-undo-34.2.0.tgz",
@@ -6188,24 +5766,6 @@
}
}
},
- "@ckeditor/ckeditor5-utils": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-utils/-/ckeditor5-utils-39.0.1.tgz",
- "integrity": "sha512-lQ+1h4FgUScEdk547uCzfdvajFigVt4u0mRw1m9TtJ3B2GiatwRvst8TZEuWl8aFrIHjQ/gho66QIElJi/6+CA==",
- "dev": true,
- "requires": {
- "lodash-es": "4.17.21"
- }
- },
- "@ckeditor/ckeditor5-watchdog": {
- "version": "39.0.1",
- "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-watchdog/-/ckeditor5-watchdog-39.0.1.tgz",
- "integrity": "sha512-f5Uo0RdcbeKGs0gmBm8Y8c+Z9YgcjqX7ai4vdcw8HIEc0vCeEanPt816V53nLZ3LbPgez8LeWluR7VlzoxKO+g==",
- "dev": true,
- "requires": {
- "lodash-es": "4.17.21"
- }
- },
"@ckeditor/ckeditor5-widget": {
"version": "34.2.0",
"resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-widget/-/ckeditor5-widget-34.2.0.tgz",
@@ -6938,15 +6498,6 @@
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
- "color-parse": {
- "version": "1.4.2",
- "resolved": "https://registry.npmjs.org/color-parse/-/color-parse-1.4.2.tgz",
- "integrity": "sha512-RI7s49/8yqDj3fECFZjUI1Yi0z/Gq1py43oNJivAIIDSyJiOZLfYCRQEgn8HEVAj++PcRe8AnL2XF0fRJ3BTnA==",
- "dev": true,
- "requires": {
- "color-name": "^1.0.0"
- }
- },
"colord": {
"version": "2.9.3",
"resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz",
@@ -8955,12 +8506,6 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"dev": true
},
- "vanilla-colorful": {
- "version": "0.7.2",
- "resolved": "https://registry.npmjs.org/vanilla-colorful/-/vanilla-colorful-0.7.2.tgz",
- "integrity": "sha512-z2YZusTFC6KnLERx1cgoIRX2CjPRP0W75N+3CC6gbvdX5Ch47rZkEMGO2Xnf+IEmi3RiFLxS18gayMA27iU7Kg==",
- "dev": true
- },
"watchpack": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExample/avoindataExampleEditing.js b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExample/avoindataExampleEditing.js
index 394b0cac1c..1c1778821b 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExample/avoindataExampleEditing.js
+++ b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExample/avoindataExampleEditing.js
@@ -181,7 +181,7 @@ export default class AvoindataExampleEditing extends Plugin {
class: 'avoindata-example',
});
- return toWidget(section, viewWriter, { label: 'Avoindata Example widget' });
+ return toWidget(section, viewWriter, { label: 'Avoindata Example' });
},
});
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExample/avoindataExampleUI.js b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExample/avoindataExampleUI.js
index 1f119ef030..16db40f14b 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExample/avoindataExampleUI.js
+++ b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExample/avoindataExampleUI.js
@@ -17,7 +17,7 @@ export default class AvoindataExampleUI extends Plugin {
// Create the toolbar button.
buttonView.set({
- label: editor.t('Avoindata Example widget'),
+ label: editor.t('Avoindata Example'),
icon,
tooltip: true,
});
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExample/insertAvoindataExampleCommand.js b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExample/insertAvoindataExampleCommand.js
index 14ead525cb..7f65c6462c 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExample/insertAvoindataExampleCommand.js
+++ b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExample/insertAvoindataExampleCommand.js
@@ -12,7 +12,8 @@ export default class InsertAvoindataExampleCommand extends Command {
model.change((writer) => {
// Insert * at the current selection position
// in a way that will result in creating a valid model structure.
- model.insertContent(createAvoindataExample(writer));
+ const avoindataExample = createAvoindataExample(writer);
+ model.insertContent(avoindataExample);
});
}
@@ -48,8 +49,12 @@ function createAvoindataExample(writer) {
// The text content will automatically be wrapped in a
// `
`.
- writer.appendElement('paragraph', avoindataExampleTitle);
- writer.appendElement('paragraph', avoindataExampleContent);
+ const title = writer.createElement('paragraph');
+ writer.insertText('Title', title, 0);
+ writer.append(title, avoindataExampleTitle);
+ const content = writer.createElement('paragraph');
+ writer.insertText('Content', content, 0);
+ writer.append(content, avoindataExampleContent);
// Return the element to be added to the editor.
return avoindataExample;
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExpander/avoindataExpanderEditing.js b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExpander/avoindataExpanderEditing.js
index d47aeb3e74..d28ee28b93 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExpander/avoindataExpanderEditing.js
+++ b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExpander/avoindataExpanderEditing.js
@@ -188,7 +188,7 @@ export default class AvoindataExpanderEditing extends Plugin {
class: 'avoindata-expander',
});
- return toWidget(section, viewWriter, { label: 'Avoindata Expander widget' });
+ return toWidget(section, viewWriter, { label: 'Avoindata Expander' });
},
});
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExpander/avoindataExpanderUI.js b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExpander/avoindataExpanderUI.js
index fdd778d37a..76821a6c2f 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExpander/avoindataExpanderUI.js
+++ b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExpander/avoindataExpanderUI.js
@@ -17,7 +17,7 @@ export default class AvoindataExpanderUI extends Plugin {
// Create the toolbar button.
buttonView.set({
- label: editor.t('Avoindata Expander widget'),
+ label: editor.t('Avoindata Expander'),
icon,
tooltip: true,
});
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExpander/insertAvoindataExpanderCommand.js b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExpander/insertAvoindataExpanderCommand.js
index 44e7656db6..9fff3f65b4 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExpander/insertAvoindataExpanderCommand.js
+++ b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataExpander/insertAvoindataExpanderCommand.js
@@ -12,7 +12,8 @@ export default class InsertAvoindataExpanderCommand extends Command {
model.change((writer) => {
// Insert * at the current selection position
// in a way that will result in creating a valid model structure.
- model.insertContent(createAvoindataExpander(writer));
+ const avoindataExpander = createAvoindataExpander(writer);
+ model.insertContent(avoindataExpander);
});
}
@@ -48,8 +49,12 @@ function createAvoindataExpander(writer) {
// The text content will automatically be wrapped in a
// `
`.
- writer.appendElement('paragraph', avoindataExpanderTitle);
- writer.appendElement('paragraph', avoindataExpanderContent);
+ const title = writer.createElement('paragraph');
+ writer.insertText('Title', title, 0);
+ writer.append(title, avoindataExpanderTitle);
+ const content = writer.createElement('paragraph');
+ writer.insertText('Content', content, 0);
+ writer.append(content, avoindataExpanderContent);
// Return the element to be added to the editor.
return avoindataExpander;
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataHint/avoindataHintEditing.js b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataHint/avoindataHintEditing.js
index c40e0d5e90..9197d6f08d 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataHint/avoindataHintEditing.js
+++ b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataHint/avoindataHintEditing.js
@@ -2,6 +2,7 @@ import { Plugin } from 'ckeditor5/src/core';
import { toWidget, toWidgetEditable } from 'ckeditor5/src/widget';
import { Widget } from 'ckeditor5/src/widget';
import InsertAvoindataHintCommand from './insertAvoindataHintCommand';
+import icon from '../../icons/icon-hint.svg'
/**
* CKEditor 5 plugins do not work directly with the DOM. They are defined as
@@ -155,7 +156,7 @@ export default class AvoindataHintEditing extends Plugin {
conversion.for('downcast').elementToElement({
model: 'avoindataHintIcon',
view: (modelElement, { writer }) => {
- return writer.createEmptyElement('img', { class: "avoindata-hint-icon", src: '/themes/avoindata/images/avoindata-hint-icon.svg' })
+ return writer.createEmptyElement('img', { class: "avoindata-hint-icon", src: icon })
}
});
@@ -182,7 +183,7 @@ export default class AvoindataHintEditing extends Plugin {
class: 'avoindata-hint',
});
- return toWidget(section, viewWriter, { label: 'Avoindata Hint widget' });
+ return toWidget(section, viewWriter, { label: 'Avoindata Hint' });
},
});
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataHint/avoindataHintUI.js b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataHint/avoindataHintUI.js
index 76d44236fb..35d8f477b3 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataHint/avoindataHintUI.js
+++ b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataHint/avoindataHintUI.js
@@ -17,7 +17,7 @@ export default class AvoindataHintUI extends Plugin {
// Create the toolbar button.
buttonView.set({
- label: editor.t('Avoindata Hint widget'),
+ label: editor.t('Avoindata Hint'),
icon,
tooltip: true,
});
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataHint/insertAvoindataHintCommand.js b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataHint/insertAvoindataHintCommand.js
index 7af54eae12..aa3094f046 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataHint/insertAvoindataHintCommand.js
+++ b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataHint/insertAvoindataHintCommand.js
@@ -12,7 +12,8 @@ export default class InsertAvoindataHintCommand extends Command {
model.change((writer) => {
// Insert * at the current selection position
// in a way that will result in creating a valid model structure.
- model.insertContent(createAvoindataHint(writer));
+ const avoindataHint = createAvoindataHint(writer);
+ model.insertContent(avoindataHint);
});
}
@@ -48,7 +49,9 @@ function createAvoindataHint(writer) {
// The text content will automatically be wrapped in a
// `
`.
- writer.appendElement('paragraph', avoindataHintContent);
+ const content = writer.createElement('paragraph');
+ writer.insertText('Content', content, 0);
+ writer.append(content, avoindataHintContent);
// Return the element to be added to the editor.
return avoindataHint;
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataNote/avoindataNoteEditing.js b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataNote/avoindataNoteEditing.js
index 0fca5d1797..3727233b2a 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataNote/avoindataNoteEditing.js
+++ b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataNote/avoindataNoteEditing.js
@@ -219,7 +219,7 @@ export default class AvoindataNoteEditing extends Plugin {
class: 'avoindata-note',
});
- return toWidget(section, viewWriter, { label: 'Avoindata Note widget' });
+ return toWidget(section, viewWriter, { label: 'Avoindata Note' });
},
});
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataNote/insertAvoindataNoteCommand.js b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataNote/insertAvoindataNoteCommand.js
index f220b4b9b0..0cb1625243 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataNote/insertAvoindataNoteCommand.js
+++ b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataNote/insertAvoindataNoteCommand.js
@@ -12,7 +12,8 @@ export default class InsertAvoindataNoteCommand extends Command {
model.change((writer) => {
// Insert * at the current selection position
// in a way that will result in creating a valid model structure.
- model.insertContent(createAvoindataNote(writer));
+ const avoindataNote = createAvoindataNote(writer);
+ model.insertContent(avoindataNote);
});
}
@@ -50,8 +51,12 @@ function createAvoindataNote(writer) {
// The text content will automatically be wrapped in a
// `
`.
- writer.appendElement('paragraph', avoindataNoteTitle);
- writer.appendElement('paragraph', avoindataNoteContent);
+ const title = writer.createElement('paragraph');
+ writer.insertText('Title', title, 0);
+ writer.append(title, avoindataNoteTitle);
+ const content = writer.createElement('paragraph');
+ writer.insertText('Content', content, 0);
+ writer.append(content, avoindataNoteContent);
// Return the element to be added to the editor.
return avoindataNote;
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataSection/avoindataSectionUI.js b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataSection/avoindataSectionUI.js
index 2c557b8626..64857dec06 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataSection/avoindataSectionUI.js
+++ b/drupal/modules/avoindata-ckeditor5-plugins/src/avoindataSection/avoindataSectionUI.js
@@ -25,7 +25,7 @@ export default class AvoindataSectionUI extends Plugin {
// Create the toolbar button.
buttonView.set({
- label: editor.t('Avoindata Section widget'),
+ label: editor.t('Avoindata Section'),
icon,
tooltip: true
});
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/externalLink/externalLink.js b/drupal/modules/avoindata-ckeditor5-plugins/src/externalLink/externalLink.js
deleted file mode 100644
index fb75e9d64b..0000000000
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/externalLink/externalLink.js
+++ /dev/null
@@ -1,113 +0,0 @@
-import { Plugin } from 'ckeditor5/src/core';
-
-export default class ExternalLink extends Plugin {
- init() {
- const { conversion } = this.editor;
-
- // Upcast Converter for the old ckeditor4 plugin format
- conversion.for('upcast').elementToAttribute({
- model: 'linkIsExternal',
- view: {
- name: 'a',
- classes: ['external'],
- attributes: ['aria-label', 'target'],
- },
- });
-
- // Extra consumption for the leftover svg icon
- conversion.for('upcast').add(dispatcher => {
- // Look for every view svg element.
- dispatcher.on('element:svg', (evt, data, conversionApi) => {
- // Get all the necessary items from the conversion API object.
- const {
- consumable
- } = conversionApi;
-
- // Get view item from data object.
- const { viewItem } = data;
-
- // Define elements consumables.
- const svg = { name: 'svg', attributes: ['viewBox'] };
- const use = { name: 'use', attributes: ['href'] };
-
- // Tests if the view element can be consumed.
- if (!consumable.test(viewItem, svg)) {
- return;
- }
-
- // Check if there is only one child.
- if (viewItem.childCount !== 1) {
- return;
- }
-
- // Get the first child element.
- const firstChildItem = viewItem.getChild(0);
-
- // Check if the first element is a div.
- if (!firstChildItem.is('element', 'use')) {
- return;
- }
-
- // Tests if the first child element can be consumed.
- if (!consumable.test(firstChildItem, use)) {
- return;
- }
-
- // If a use tag inside a svg has the string 'avoindata_external-link' within the href
- // we can assume it's the old ckeditor4 plugin format and simply get rid of them
- if (firstChildItem?.getAttribute('href')?.includes('avoindata_external-link')) {
- // Consume the main outer wrapper element.
- consumable.consume(viewItem, svg);
- // Consume the inner wrapper element.
- consumable.consume(firstChildItem, use);
- }
- });
- });
- /*
- const editor = this.editor;
-
- // `listenTo()` and `editor` are available thanks to `Plugin`.
- // By using `listenTo()` you will ensure that the listener is removed when
- // the plugin is destroyed.
- this.listenTo(editor.data, 'ready', () => {
- const linkCommand = editor.commands.get('link');
- const { selection } = editor.model.document;
-
- let linkCommandExecuting = false;
-
- linkCommand.on('execute', (evt, args) => {
- const linkIsExternal = args[1]['linkIsExternal']
-
- if (linkIsExternal) {
- if (linkCommandExecuting) {
- linkCommandExecuting = false;
- return;
- }
-
- // If the additional attribute was passed, we stop the default execution
- // of the LinkCommand. We're going to create Model#change() block for undo
- // and execute the LinkCommand together with setting the extra attribute.
- evt.stop();
-
- // Prevent infinite recursion by keeping records of when link command is
- // being executed by this function.
- linkCommandExecuting = true;
-
- // Wrapping the original command execution in a model.change() block to make sure there's a single undo step
- // when the extra attribute is added.
-
- editor.model.change(writer => {
- editor.execute('link', ...args);
- const link = selection.getLastPosition().nodeBefore;
- // writer.insertElement('avoindataExternalLink', selection.getLastPosition())
- });
- }
- })
- });
- */
- }
-
- static get pluginName() {
- return 'ExternalLink';
- }
-}
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/src/externalLink/index.js b/drupal/modules/avoindata-ckeditor5-plugins/src/externalLink/index.js
deleted file mode 100644
index b0e2d65cb1..0000000000
--- a/drupal/modules/avoindata-ckeditor5-plugins/src/externalLink/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * @file The build process always expects an index.js file. Anything exported
- * here will be recognized by CKEditor 5 as an available plugin. Multiple
- * plugins can be exported in this one file.
- *
- * I.e. this file's purpose is to make plugin(s) discoverable.
- */
-
-import ExternalLink from './externalLink';
-
-export default {
- ExternalLink,
-};
diff --git a/drupal/modules/avoindata-ckeditor5-plugins/webpack.config.js b/drupal/modules/avoindata-ckeditor5-plugins/webpack.config.js
index b8badd640f..86eb697773 100644
--- a/drupal/modules/avoindata-ckeditor5-plugins/webpack.config.js
+++ b/drupal/modules/avoindata-ckeditor5-plugins/webpack.config.js
@@ -69,11 +69,17 @@ getDirectories('./src').forEach((dir) => {
},
{
test: /\.svg$/,
- type: "asset/inline",
+ type: "asset/resource",
+ generator: {
+ filename: '../icons/[base]'
+ }
},
{
test: /\.css$/,
- type: 'asset'
+ type: "asset/resource",
+ generator: {
+ filename: '../css/[base]'
+ }
}
]
}]