Giter Site home page Giter Site logo

Comments (2)

Jmzp avatar Jmzp commented on August 16, 2024

Hi @sos-productions, can you provide me with the sample text that you use?

from editorjs-undo.

sos-productions avatar sos-productions commented on August 16, 2024

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
the table of content loaded in editorjs is seen as a paragraph which json is
---8<--------------
{
type : 'paragraph',
data : {
text : text:<strong>Introduction</strong><br><strong>1. The Rise of Totalitarian Communism</strong><br>\na. The Soviet Communists\u2019 Rise to Power<br>\nb. The Chinese Communist Party\u2019s Power Grab<br><strong>2. The Brutality of Communist Rule</strong><br>\na. Soviet Communist Atrocities<br>\n\u2013 Killing by Famine<br>\n\u2013 The Gulags: Europe\u2019s First Concentration Camps<br>\n\u2013 The Great Terror Against the Soviet Elite<br>\nb. The CCP\u2019s Deadly Campaigns<br>\n\u2013 The Great Chinese Famine<br>\n\u2013 The Cultural Revolution: Slaughter and Cultural Genocide<br>\n\u2013 Unprecedented Evil: The Persecution of Falun Gong<br><strong>3. A Century of Killing</strong><br><strong>References</strong>
}
}
-----8<-------------------

As I told you, if make a little change on the paragraph and undo , it is was washing all the tags including strong.
due to the call this.editor.save().then((savedData) => {

Now I fixed it with 4 steps:

  1. a patch on editor.js I submitted here codex-team/editor.js#1281 , waiting
    to be approved.
  2. I rebuild the editor with ./build helper script
  3. in index.js of Undo plugin. lin 81, I set editor.save(true) this time
  4. I rebuilt too Undo Plugin

and it works like a charm.

from editorjs-undo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.