tiptap/packages/extension-text-style/index.ts
2020-11-06 14:46:59 +01:00

26 lines
386 B
TypeScript

import { createMark } from '@tiptap/core'
const TextStyle = createMark({
name: 'textStyle',
parseHTML() {
return [
{
tag: 'span',
},
]
},
renderHTML({ attributes }) {
return ['span', attributes, 0]
},
})
export default TextStyle
declare module '@tiptap/core/src/Editor' {
interface AllExtensions {
TextStyle: typeof TextStyle,
}
}