Giter VIP home page Giter VIP logo

Comments (2)

sbaughman avatar sbaughman commented on June 29, 2024

Did some investigation into this issue and here are some findings:

  1. Default behavior is pretty good. Switching headings to paragraphs and back does not trigger the ACF and lose the id, even if other actions are done in between.
  2. Auto-save and manually saving also does not trigger the ACF, so an autosave will not lose the id.
  3. What does lose the id is toggling the source dialog, but in that case all of the elements are re-rendered anyway, so customData and expando data also do not work.

At this point, it seems that the way to allow data to persist through a toggle of source dialog or other such actions would be through storing heading data in a variable in the plugin itself. However, all of the more obvious cases for id persistence are already covered by default behavior. I think in these more complex cases, it would be little better than a guess as to whether persisting an id was actually the author's intention, at least until we get some user feedback

from ckeditor-plugin-autoid-headings.

caffodian avatar caffodian commented on June 29, 2024

Thanks for the writeup! Good summary of stuff we discussed.

Given that the major broken case seems to be source dialog (and I assume setData), we should just punt on this. Someone would have to de-header something and re-header it via the source dialog (or afterwards) for the id to go missing, which seems quite edgy.

from ckeditor-plugin-autoid-headings.

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.