krebil
(Tobias Mønster)
1
So I want apply different parseOptions to tiptap to support French typegraphy rules based on non breaking whitespaces.
I’m looking at this option specifically Editor Class | Tiptap Editor Docs
I’ve tried in an extension, but I’m not sure how to get the editor instance.
krebil
(Tobias Mønster)
3
I found a method on the tipTapExtensionApiBase that I did not notice at first. Implementing that seems to work.
export default class UmbTiptapWhitespaceExtensionApi extends UmbTiptapExtensionApiBase {
getTiptapExtensions(_?: UmbTiptapExtensionArgs): Array<Extension | Mark | Node> {
return [];
}
setEditor(editor: Editor) {
editor.setOptions({
parseOptions:{
preserveWhitespace: true,
}
})
}
}