mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 09:15:50 +01:00
chore(ckeditor5/plugins): integrate remove format links
This commit is contained in:
19
packages/ckeditor5/src/plugins/remove_format_links.ts
Normal file
19
packages/ckeditor5/src/plugins/remove_format_links.ts
Normal 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
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user