|
@@ -1,5 +1,5 @@ |
|
|
import {Mark} from "tiptap"; |
|
|
import {Mark} from "tiptap"; |
|
|
import {toggleMark} from "tiptap-commands"; |
|
|
|
|
|
|
|
|
import {toggleMark, updateMark} from "tiptap-commands"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// — Mot - Accronyme |
|
|
// — Mot - Accronyme |
|
@@ -48,7 +48,7 @@ export default class CustomStyle extends Mark { |
|
|
{ |
|
|
{ |
|
|
tag: "span.dede-style", |
|
|
tag: "span.dede-style", |
|
|
getAttrs(dom) { |
|
|
getAttrs(dom) { |
|
|
return {type: dom.classList[1]}; |
|
|
|
|
|
|
|
|
return {type: dom.classList}; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
@@ -59,6 +59,6 @@ export default class CustomStyle extends Mark { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
commands({type}) { |
|
|
commands({type}) { |
|
|
return attrs => toggleMark(type, attrs); |
|
|
|
|
|
|
|
|
return attrs => { return updateMark(type, attrs);} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |