bastihilger/nova-tiptap

editHtml is not working properly

bcoelhodev opened this issue · 4 comments

Hi,

When i activated the edit html option and add some html (<iframe> or <div>) and change to normal mode, the html is removed.
If i insert something like <p> or <h6> works nice.

I'm using v2.7.3 and laravel nova v3.20.0.

Hi @bcoelhodev - that is expected behavior. Only the nodes that are allowed in Tiptap can be saved. Iframes and divs are not part of theses nodes.

So it is not possible to add iframe at all?! Right?

Iframe and Divs are not part of the default nodes in Tiptap (https://tiptap.dev/api/nodes), so it's kinda hard to implement this. It is not impossible, but also not easy.

I personally use Nova Tiptap as a text editor in Nova - not an HTML Editor or a "content editor". I normally don't even have use for the image button. For advanced use cases I usually use the package "Nova Flexible Content" (https://whitecube.github.io/nova-flexible-content) by @whitecube, where I then can have a block for an "iframe" and another block for a "text editor" (and another one for example for an image, or an image gallery, and so on). So I personally never had the need to extend Tiptap like that. But I am open to PRs in this direction, if you want to give it a shot.

Thanks @manogi