add HTMLAttributes to defaultoptions
This commit is contained in:
@@ -5,12 +5,22 @@ import {
|
||||
markPasteRule,
|
||||
} from '@tiptap/core'
|
||||
|
||||
export interface HighlightOptions {
|
||||
HTMLAttributes: {
|
||||
[key: string]: any
|
||||
},
|
||||
}
|
||||
|
||||
export const inputRegex = /(?:^|\s)((?:==)((?:[^~]+))(?:==))$/gm
|
||||
export const pasteRegex = /(?:^|\s)((?:==)((?:[^~]+))(?:==))/gm
|
||||
|
||||
const Highlight = createMark({
|
||||
name: 'highlight',
|
||||
|
||||
defaultOptions: <HighlightOptions>{
|
||||
HTMLAttributes: {},
|
||||
},
|
||||
|
||||
addAttributes() {
|
||||
return {
|
||||
color: {
|
||||
|
||||
Reference in New Issue
Block a user