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
+41
View File
@@ -0,0 +1,41 @@
/**
* Basic sample plugin inserting current date and time into CKEditor editing area.
*
* Created out of the CKEditor Plugin SDK:
* http://docs.ckeditor.com/#!/guide/plugin_sdk_intro
*/
// Register the plugin within the editor.
CKEDITOR.plugins.add( 'timestamp', {
// Register the icons. They must match command names.
icons: 'timestamp',
// The plugin initialization logic goes inside this method.
init: function( editor ) {
// Define an editor command that inserts a timestamp.
editor.addCommand( 'insertTimestamp', {
// Define the function that will be fired when the command is executed.
exec: function( editor ) {
var URL = "../../?cmd=gettimedate";
$.ajax({
url: URL,
context: document.body,
success: function(data) {
editor.insertHtml(data);
}
});
}
});
// Create the toolbar button that executes the above command.
editor.ui.addButton( 'Timestamp', {
label: 'Insert Timestamp',
command: 'insertTimestamp',
toolbar: 'insert'
});
}
});