mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 14:13:21 +08:00
refactoring
This commit is contained in:
parent
8943f8b9ae
commit
67018ce043
@ -16,7 +16,7 @@ export default function (doc: Node): DecorationSet {
|
||||
const color = match[0]
|
||||
const index = match.index || 0
|
||||
const from = position + index
|
||||
const to = position + index + color.length
|
||||
const to = from + color.length
|
||||
const decoration = Decoration.inline(from, to, {
|
||||
class: 'color',
|
||||
style: `--color: ${color}`,
|
||||
|
Loading…
Reference in New Issue
Block a user