Open tasiotas opened 2 weeks ago
core
2.9.1
I want to extend Heading so that it has tag inside.
import { Heading as TiptapHeading } from '@tiptap/extension-heading' import { mergeAttributes } from '@tiptap/vue-3' export const Heading = TiptapHeading.extend({ renderHTML({ node, HTMLAttributes }) { const hasLevel = this.options.levels.includes(node.attrs.level) const level = hasLevel ? node.attrs.level : this.options.levels[0] return [ `h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), [ 'a', { href: '/', }, 0, ], ] }, }) export default Heading
It works fine in Firefox, but in Chrome I can only input one character. If I edit html via devtools and insert at least two characters into tag, then I can input more, but not when the cursor is at the end of the text. So bizzare! what is going on?
Chrome
No response
Be able to edit heading just like in Firefox.
Affected Packages
core
Version(s)
2.9.1
Bug Description
I want to extend Heading so that it has tag inside.
It works fine in Firefox, but in Chrome I can only input one character. If I edit html via devtools and insert at least two characters into tag, then I can input more, but not when the cursor is at the end of the text. So bizzare! what is going on?
Browser Used
Chrome
Code Example URL
No response
Expected Behavior
Be able to edit heading just like in Firefox.
Additional Context (Optional)
No response
Dependency Updates