edit: right-align ckeditor toolbar
[minimedit.git] / edit.js
diff --git a/edit.js b/edit.js
index 0db437427c0305dc980dc1697d5e290fabf58aa4..0d45de956e133ee68256e4d2701cfe76e910adcd 100644 (file)
--- a/edit.js
+++ b/edit.js
@@ -56,6 +56,10 @@ CKEDITOR.on('instanceCreated', function (event) {
                        ['Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', '-', 'Anchor', 'Link'],
                        ['HorizontalRule', 'Table', 'Image'],
                ];
+               config.toolbarCanCollapse = true;
+               config.floatSpacePreferRight = true;
+               config.floatSpaceDockedOffsetY = 0;
+               config.startupFocus = true;
 
                config.disableObjectResizing = true;
                document.execCommand('enableObjectResizing', false, false); // workaround in inline mode; ff bug?
@@ -75,7 +79,7 @@ CKEDITOR.on('instanceCreated', function (event) {
        CKEDITOR.disableAutoInline = true;
 
 // add edit link to menu
-var pagebody = document.getElementsByClassName('article')[0];
+var pagebody = document.getElementsByClassName('static')[0];
 if (pagebody) {
        var editlink = document.createElement('a');
        editlink.style.cursor = 'pointer';
@@ -91,7 +95,6 @@ if (pagebody) {
                }
                else {
                        CKEDITOR.inline(pagebody);
-                       pagebody.focus();
                }
                document.body.className = toggled ? '' : 'edit';
                return false;