slab / quill

Quill is a modern WYSIWYG editor built for compatibility and extensibility
https://quilljs.com
BSD 3-Clause "New" or "Revised" License
43.54k stars 3.38k forks source link

Is it possible to convert from a custom Blot format to another #3052

Closed Wasp-dev closed 4 years ago

Wasp-dev commented 4 years ago

I there!

I need to convert a node format to another one. Is it possible?

This is my context: I have created a custom blot format to format specifically all my html embed with a special html wrapper

i got for example, a standard tweet like this one: <blockquote class="twitter-tweet"><p lang="en" dir="ltr">Saw this posted in /r/Formula1 (because there&#39;s a driver in it), but it&#39;s 10/10 hilarious for any foodies out there. The Carbonara Controversy is real! <a href="https://t.co/RtA47NUOaP">https://t.co/RtA47NUOaP</a> <a href="https://twitter.com/hashtag/SpreadTheTruth?src=hash&amp;ref_src=twsrc%5Etfw">#SpreadTheTruth</a></p>&mdash; Quill18 (@quill18) <a href="https://twitter.com/quill18/status/1265668795168952321?ref_src=twsrc%5Etfw">May 27, 2020</a></blockquote>

I wan to be able to detect this tagName with specific className (this i got) and format it to my first custom format. I could create all my custom elements again for each html embed but that is just too much and not clean Is it possible in the static create method to call my other format?

Hope this is clear enough. Keep me posted! Thanks in advance

Wasp-dev commented 4 years ago

wrong place. sorry