I want to put some html into a tiptap editor, as I want edit what I have saved earlier. But if I have some inline styles inside, tiptap deletes it. Does anybody know what I can do with it?
this.editor.setContent('<p style="text-align: center">fffff</p>')
If you have TextAlignExtension @tiptap/extension-text-align
, the text-align will keep.
You can verify here https://wode.vercel.app/tiptap
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.