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
Undo issue related to editorjs #16
Comments
Hi @sos-productions, can you provide me with the sample text that you use? |
Hi @Jmzp, I just created a paragraph with some styling like strong, I took the chapter 3 of the excellent https://www.theepochtimes.com/c-how-the-specter-of-communism-is-ruling-our-world ...choose As I told you, if make a little change on the paragraph and undo , it is was washing all the tags including strong. Now I fixed it with 4 steps:
and it works like a charm. |
* Create node.js.yml * Apply the suggested corrections in the ci setup * Apply additional suggested corrections * Add the possible solution to the problem reported by GitHub * Add another possible solution to the problem reported by GitHub
As Undo plugin need an inital state
`
function initUndo() {
`
and in my paragaph plugin config, I have
paragraph: {
text: {
type: "string",
allowedTags: "i,b,u,a[href],strong,em,br,br,dt,dl,embed,ol,li,ul"
}
}
but edtor sanitize at least strong tag (and I guess others too) on editor.save()
/**
* Saving example
*/
`
so when I undo, I got only text with br tag preserved in paragraph
The text was updated successfully, but these errors were encountered: