git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
edit: autostart mode on #edit hash
[minimedit.git]
/
edit.js
diff --git
a/edit.js
b/edit.js
index 0db437427c0305dc980dc1697d5e290fabf58aa4..164cc1ef9829a2add8472ebe617771bd99a90c70 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'],
];
['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?
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
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';
if (pagebody) {
var editlink = document.createElement('a');
editlink.style.cursor = 'pointer';
@@
-91,11
+95,13
@@
if (pagebody) {
}
else {
CKEDITOR.inline(pagebody);
}
else {
CKEDITOR.inline(pagebody);
- pagebody.focus();
}
document.body.className = toggled ? '' : 'edit';
return false;
};
}
document.body.className = toggled ? '' : 'edit';
return false;
};
+ if (window.location.hash == '#edit') {
+ editlink.onclick();
+ }
document.querySelector('header ul').appendChild(editlink);
}
document.querySelector('header ul').appendChild(editlink);
}