Commit 8b2944c6 by Awais Committed by Awais Qureshi

Fixing tinymce bugs.

ECOM-7790-edit
parent 6f7aeeb3
...@@ -6,10 +6,16 @@ $(document).ready(function(){ ...@@ -6,10 +6,16 @@ $(document).ready(function(){
var current_course_object = $('#' + element_id).val(); var current_course_object = $('#' + element_id).val();
var history_object_value = $(this).val().trim(); var history_object_value = $(this).val().trim();
if (history_object_value !='') { var d = dmp.diff_main(history_object_value, current_course_object);
var d = dmp.diff_main(current_course_object, history_object_value); dmp.diff_cleanupEfficiency(d)
dmp.diff_cleanupEfficiency(d) tinymce.get(element_id).setContent(decodeEntities(dmp.diff_prettyHtml(d)))
tinymce.get(element_id).setContent(dmp.diff_prettyHtml(d))
}
}); });
}); });
function decodeEntities(encodedString) {
var textArea = document.createElement('textarea');
textArea.innerHTML = encodedString;
return textArea.value;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment