nytimes / ice

track changes with javascript
Other
1.71k stars 194 forks source link

Track Changes for Tinymce 5 #137

Open vigneshwaranikt opened 4 years ago

vigneshwaranikt commented 4 years ago

Can i use Ice plugin for tinymce 5?

DNWEIJ commented 4 years ago

You can use the branch Update to tiny mce5. Note: You need to replace the svg images in the plugin to something that looks better...

Quixomatic commented 4 years ago

@DNWEIJ I don't see that branch, is it still available?

DNWEIJ commented 4 years ago

sry, the pull request: https://github.com/nytimes/ice/pull/141

manisha05be commented 4 years ago

Where can i get tracker with menubar. Ice tracker and menubar/toolbar of tiymce5.

chross commented 2 years ago

Do I need to load other files along with tinymce? I'm currently placing the ice and icesearchreplace folders from the branch: /ice-6e68842e6e8a543a49162ca53b688055f70eb866/lib/tinymce/js/tinymce/plugins in my tinymce plugins folder. When trying to load tinymce with ice as a plugin, nothing happens. I have already renamed plugins/ice/plugin.js to plugins/ice/plugin.min.js.

I have also replaced the editor.off with ed.off occurences in plugin.js as that seems to be erroneous.

The error I'm getting is: Uncaught ReferenceError: ice is not defined and Uncaught TypeError: changeEditor is null

Am I using the wrong file or am I missing some libs?

I'm using TinyMCE 5.2.0 (2020-02-13).

chross commented 2 years ago

Ok, I've managed to get it half working:

I have concatenated the following files into a ice-master.js:

rangy-core.js
ice.js
dom.js
icePlugin.js
icePluginManager.js
bookmark.js
selection.js
IceAddTitlePlugin.js
IceCopyPastePlugin.js
IceEmdashPlugin.js
IceSmartQuotesPlugin.js

which I am loading before loading tinymce.

Also, I did rename the plugin.js to plugin.min.js inside the /plugins/ice folder and edited all occurences of editor.off. I changed them to ed.off.

The tracking works now, but I cannot delete text using del or backspace. Selecting text and typing will correctly delete the text and insert the newly typed text but simply deleting does not work.

Any sugggestions?

lalit-sf commented 2 years ago

did u get fix on your last issue(deleting does not work.)!

chross commented 2 years ago

Unfortunately not, still looking into it.