chore(ckeditor5/plugins): integrate remove format links

This commit is contained in:
Elian Doran
2025-05-03 17:05:50 +03:00
parent 2dcd37001f
commit bf45720f21
3 changed files with 22 additions and 9 deletions

View File

@@ -0,0 +1,19 @@
import { Plugin, RemoveFormat } from "ckeditor5";
/**
* A simple plugin that extends the remove format feature to consider links.
*/
export default class RemoveFormatLinksPlugin extends Plugin {
static get requires() {
return [ RemoveFormat ]
}
init() {
// Extend the editor schema and mark the "linkHref" model attribute as formatting.
this.editor.model.schema.setAttributeProperties( 'linkHref', {
isFormatting: true
});
}
}