git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
page: stable include path (site then minimedit root)
[minimedit.git]
/
edit.js
diff --git
a/edit.js
b/edit.js
index 1b71547f359950ab25950160e6de4195129ac495..5384f2c9eea1039ad6109f95236b85fa78dd45a0 100644
(file)
--- a/
edit.js
+++ b/
edit.js
@@
-9,7
+9,7
@@
CKEDITOR.plugins.add('inlinesave', {
// wrap long line after each sentence
body = body.replace(/^(\t*).{73,}/mg, function (line, indent) {
var dots = '(?:.{24,72}|.{73,}?)'; // chars before punctuation
// wrap long line after each sentence
body = body.replace(/^(\t*).{73,}/mg, function (line, indent) {
var dots = '(?:.{24,72}|.{73,}?)'; // chars before punctuation
- var wrap = new RegExp('('+dots+'[.
;
:!?]) (?=[A-Z(<])', 'g'); // separate lines
+ var wrap = new RegExp('('+dots+'[.:!?]) (?=[A-Z(<])', 'g'); // separate lines
return line.replace(wrap, '$1\n'+indent+'\t');
});
// treat standalone placeholders as block elements
return line.replace(wrap, '$1\n'+indent+'\t');
});
// treat standalone placeholders as block elements
@@
-76,7
+76,7
@@
CKEDITOR.on('instanceCreated', function (event) {
editor.on('configLoaded', function () {
var config = editor.config;
config.language = 'nl';
editor.on('configLoaded', function () {
var config = editor.config;
config.language = 'nl';
- config.extraPlugins = '
sourcedialog,
inlinesave,placeholder,image2,uploadimage';
+ config.extraPlugins = 'inlinesave,placeholder,image2,uploadimage';
config.format_tags = 'h2;h3;h4;p';
config.allowedContent = true;
config.entities = false; // keep unicode
config.format_tags = 'h2;h3;h4;p';
config.allowedContent = true;
config.entities = false; // keep unicode
@@
-92,10
+92,13
@@
CKEDITOR.on('instanceCreated', function (event) {
config.contentsCss = document.styleSheets[0].href;
config.toolbar = [
['Inlinesave', '-', 'Undo', 'Redo'],
config.contentsCss = document.styleSheets[0].href;
config.toolbar = [
['Inlinesave', '-', 'Undo', 'Redo'],
- ['Format', 'BulletedList', 'NumberedList', 'CreateDiv', 'Table', 'Blockquote'],
- ['HorizontalRule', 'CreatePlaceholder', 'Image'],
+ ['Format'],
['Bold', 'Italic', 'Link'],
['Bold', 'Italic', 'Link'],
- ['Sourcedialog'],
+ ['BulletedList', 'NumberedList', 'Blockquote'],
+ ['Table', 'CreateDiv'],
+ ['Image', 'HorizontalRule', 'CreatePlaceholder'],
+// ['Sourcedialog'],
+ ['closebtn'],
];
config.toolbarCanCollapse = true;
config.floatSpacePreferRight = true;
];
config.toolbarCanCollapse = true;
config.floatSpacePreferRight = true;
@@
-126,8
+129,8
@@
if (pagebody) {
editlink.onclick = undefined;
pagebody.setAttribute('contenteditable', true);
pagebody.innerHTML = pagebody.innerHTML
editlink.onclick = undefined;
pagebody.setAttribute('contenteditable', true);
pagebody.innerHTML = pagebody.innerHTML
- .replace(/<!--BLOCK:(
[^-]*
)-->[^]*?<!--\/-->/g, '$1');
- CKEDITOR.inline(pagebody);
+ .replace(/<!--BLOCK:(
.*?
)-->[^]*?<!--\/-->/g, '$1');
+ CKEDITOR.inline(pagebody
, { customConfig: '' }
);
document.body.className = 'edit';
return false;
};
document.body.className = 'edit';
return false;
};