Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting v1.6 data to v2.0 data format for insertion into the editing space. #4210

Open
c0ldst0rage opened this issue May 15, 2024 · 0 comments
Labels

Comments

@c0ldst0rage
Copy link

c0ldst0rage commented May 15, 2024

My humble apologies if this is somewhere already, but I've done (some) Googling and digging and I cannot find it.

I have a database full of v1.6 text that I need to now edit using the v2.0 editor.

Given the move to <ol> and going with <div> instead of <code></code> amongst other things, is there some function that can be called before posting the data into the editor, for re-editing?

I get that going the other way, we have quill.getSemanticHTML(), but what about pasting in?

For clarity - our code pastes the database HTML directly into the editing area, so I guess we should NOT be doing that(!)

Aha...
https://quilljs.com/docs/api/#setcontents

However, this does not format the HTML into the new 'modus', it simply adds it as pure text.

Oh wait...
I see there's quill.clipboard.dangerouslyPasteHTML - my issue is solved.

I might leave this here? May help others like me!

@luin luin added the question label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants