edit: right-align ckeditor toolbar
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 14 Sep 2017 15:40:08 +0000 (17:40 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 18 Sep 2017 18:21:28 +0000 (20:21 +0200)
Avoid overlap with [static] titles.

edit.js

diff --git a/edit.js b/edit.js
index c5d6ce3198610da8a490456c0a479c9a61d888cb..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?
@@ -91,7 +95,6 @@ if (pagebody) {
                }
                else {
                        CKEDITOR.inline(pagebody);
-                       pagebody.focus();
                }
                document.body.className = toggled ? '' : 'edit';
                return false;