loopindex / ckeditor-track-changes

Track changes plugin for CKEditor, based on ICE (track changes for TinyMCE).
www.loopindex.com
Other
51 stars 55 forks source link

- Fixed error "ICE plugin init: TypeError: sel.nativeSelection is nul… #128

Closed ZhenyaP closed 2 years ago

ZhenyaP commented 7 years ago
ZhenyaP commented 7 years ago

Hello, everyone! On this commit I fixed the following issues:

  1. When ckeditor control (with enabled change tracking functionality) is initially loaded with data that contains non-applied changes (like this: "<p>Add or delete text to unleash the power of the <strong>Track Changes CKEditor Plugin</strong>.</p><p><ins class="ice-cts-1 ice-ins" data-changedata="" data-cid="2" data-last-change-time="1502268617909" data-time="1502268615033" data-userid="18" data-username="Roger">This is Roger</ins></p>"), then (steps to reproduce bug): 1). Select all content of the ckeditor by pressing Ctrl+A shortcut 2). Try to remove all content by pressing Del button Actual Result: the javascript error "'ice.dom.remove' is not a function" occurs, which is thrown in ice.js

  2. When loading ckeditor control, the javascript error "ICE plugin init: TypeError: sel.nativeSelection is null" occurs, which is thrown in the rangy-core.js