X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/502945bc14e9fdd9f4268103227462af442c0560..90783a3ff6a8171f11f15adc7d57925548b1756f:/edit.js diff --git a/edit.js b/edit.js index 78bf6dc..dee1038 100644 --- a/edit.js +++ b/edit.js @@ -2,7 +2,7 @@ CKEDITOR.plugins.add('inlinesave', { init: function(editor) { editor.addCommand( 'inlinesave', { exec: function (editor) { - var pagename = window.location.pathname.replace(/\.html$/, '').replace(/\/$/, '/index'); + var pagename = window.location.pathname.replace(/\.php$/, '').replace(/\/$/, '/index'); var data = 'body='+encodeURIComponent(editor.getData()); ajaxpost = new XMLHttpRequest(); ajaxpost.open('POST', '/edit.php'+pagename, true); @@ -21,7 +21,7 @@ CKEDITOR.plugins.add('inlinesave', { editor.ui.addButton( 'Inlinesave', { command: 'inlinesave', label: editor.lang.save.toolbar, - icon: this.path + '../save/icons/save.png', + icon: 'save', }); } }); @@ -48,11 +48,12 @@ CKEDITOR.on('instanceCreated', function (event) { config.entities = false; // keep unicode config.filebrowserImageUploadUrl = '/edit.php?type=img'; config.forcePasteAsPlainText = true; + config.contentsCss = '/excelsior.css'; config.toolbar = [ ['Inlinesave', '-', 'ShowBlocks', 'Sourcedialog', '-', 'Undo', 'Redo'], ['Format'], ['BulletedList', 'NumberedList', '-', 'Blockquote'], - ['Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', '-', 'Link'], + ['Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', '-', 'Anchor', 'Link'], ['HorizontalRule', 'Table', 'Image'], ];