Replaced the FCKeditor with the new CKeditor v4. Implemented a plugin that allows dragging and dropping one or more files into the CKeditor - plugin name is dndfiles. Modified the save toolbar button on the CKeditor so that it behaves like a submit button. Implemented a timestamp plugin that behaves the same way as the old timestamp button on FCKeditor. Added a plugin to the CKeditor that allows typing LaTeX syntax.

This commit is contained in:
Dario Milicic
2014-08-06 15:19:55 +02:00
parent a883408085
commit d05e6016b7
3890 changed files with 169233 additions and 112 deletions
+26
View File
@@ -0,0 +1,26 @@
$(document).ready(function() {
$('textarea').addClass("ckeditor");
// Need to wait for the ckeditor instance to finish initialization
// because CKEDITOR.instances.editor.commands is an empty object
// if you try to use it immediately after CKEDITOR.replace('editor');
CKEDITOR.on('instanceReady', function (ev) {
// Create a new command with the desired exec function
var editor = ev.editor;
var overridecmd = new CKEDITOR.command(editor, {
exec: function(editor){
// Replace this with your desired save button code
// alert(editor.document.getBody().getHtml());
window.top.document.form1.jcmd.value = "Submit";
if(window.top.chkform())
window.top.cond_submit();
}
});
// Replace the old save's exec function with the new one
ev.editor.commands.save.exec = overridecmd.exec;
});
CKEDITOR.replace('Text');
});