Hi! I'm hoping to get a feel for how an experienced CKEditor would tackle this issue:
I'd like to present my users with text and allow them to edit it. But when they insert text, I want it to be auto-marked-up with a span with class "added." The span should include the modification date/time (I'm thinking in a "data-" attribute?).
Likewise, deleted text should not be deleted, but marked up with a span class="deleted" (I can style this to be "hidden"), again with the date/time.
I suppose selected text which is typed-over would then need to be marked <span class=deleted data-datetime=[datetime]> and then text inserted after that with <span class=added data-datetime=[datetime]>.
I suppose these spans would have to work across block-level elements...?
So the four issues involved would be:
1) Auto-style inserted text
2) Intercept the del or backspace key and apply a style
3) data-datetime attribute (this should be easy)
4) Apply (2) and then (1) for selected text that gets typed over
With these functions, I believe I can impleement a rudamentary "track changes" system...
Any thoughts? Thanks in advance...
It's been asked before. The
It's been asked before. The team is contemplating working on it, but for now you'll have to settle for this possible 3rd party plugin. You can always create a new feature request on our dev site.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Hm, OK. What about my
Hm, OK. What about my question #1 -- how would you go about making inserted text by default be inside a <span>?
Thanks