contexted link highlight + adjust prettier
This commit is contained in:
@@ -56,15 +56,7 @@ export default defineComponent({
|
||||
},
|
||||
},
|
||||
|
||||
emits: [
|
||||
'ready',
|
||||
'destroy',
|
||||
'blur',
|
||||
'focus',
|
||||
'input',
|
||||
'update:modelValue',
|
||||
'click',
|
||||
],
|
||||
emits: ['ready', 'destroy', 'blur', 'focus', 'input', 'update:modelValue', 'click'],
|
||||
|
||||
data(): CKEditorComponentData {
|
||||
return {
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'
|
||||
import { TwoStepCaretMovement, inlineHighlight } from 'ckeditor5/src/typing'
|
||||
|
||||
const HIGHLIGHT_CLASS = 'ck-link_selected'
|
||||
|
||||
export default class ContextedLinkEditing extends Plugin {
|
||||
init() {
|
||||
this._defineSchema() // ADDED
|
||||
this._defineConverters() // ADDED
|
||||
const twoStepCaretMovementPlugin = this.editor.plugins.get(TwoStepCaretMovement)
|
||||
twoStepCaretMovementPlugin.registerAttribute('contextedLink')
|
||||
|
||||
inlineHighlight(this.editor, 'contextedLink', 'a', HIGHLIGHT_CLASS)
|
||||
}
|
||||
_defineSchema() {
|
||||
// ADDED
|
||||
|
||||
Reference in New Issue
Block a user