diff --git a/js/ckeditor5_plugins/linkit/src/linkitediting.js b/js/ckeditor5_plugins/linkit/src/linkitediting.js index 1234567..abcdefg 100644 --- a/js/ckeditor5_plugins/linkit/src/linkitediting.js +++ b/js/ckeditor5_plugins/linkit/src/linkitediting.js @@ -36,15 +36,22 @@ export default class LinkitEditing extends Plugin { }); // View (DOM/DATA) -> Model - editor.conversion.for('upcast') - .elementToAttribute({ - view: { - name: 'a', - attributes: { - [this.attrsView[i]]: true, - } - }, - model: { + let view = { + name: 'a', + attributes: { + [this.attrsView[i]]: true, + } + }; + // Use 'classes' instead of 'attributes' for 'class' to avoid deprecated warning + if (this.attrsView[i] === 'class') { + view = { + name: 'a', + classes: true + }; + } + editor.conversion.for('upcast').elementToAttribute({ + view: view, + model: { key: attribute, value: viewElement => viewElement.getAttribute(this.attrsView[i]), }