git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
login/edit: create missing user profiles
[minimedit.git]
/
edit.js
diff --git
a/edit.js
b/edit.js
index 6dcb705cee1c72e649530d8b508ce518889338cc..049bbd0d13aff7e939e34fbf6b110ca63effeb47 100644
(file)
--- a/
edit.js
+++ b/
edit.js
@@
-3,7
+3,9
@@
CKEDITOR.plugins.add('inlinesave', {
editor.addCommand( 'inlinesave', {
exec: function (editor) {
var pagename = window.location.pathname.replace(/\/$/, '/index');
editor.addCommand( 'inlinesave', {
exec: function (editor) {
var pagename = window.location.pathname.replace(/\/$/, '/index');
- var body = editor.getData().replace(/^(\t*).{73,}/mg, function (line, indent) {
+ var body = editor.getData();
+ body = body.replace(/<br \/>\s*<br \/>/g, '<p>');
+ body = body.replace(/^(\t*).{73,}/mg, function (line, indent) {
// wrap long line after each sentence
var dots = '(?:.{24,72}|.{73,}?)'; // chars before punctuation
var wrap = new RegExp('('+dots+'[.;:!?]) (?=[A-Z(<])', 'g'); // separate lines
// wrap long line after each sentence
var dots = '(?:.{24,72}|.{73,}?)'; // chars before punctuation
var wrap = new RegExp('('+dots+'[.;:!?]) (?=[A-Z(<])', 'g'); // separate lines
@@
-67,7
+69,7
@@
CKEDITOR.on('instanceCreated', function (event) {
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
- config.filebrowserImageUploadUrl = '/edit?
type=img
';
+ config.filebrowserImageUploadUrl = '/edit?
output=ckescript
';
config.pasteFilter = pastefilter;
config.contentsCss = document.styleSheets[0].href;
config.toolbar = [
config.pasteFilter = pastefilter;
config.contentsCss = document.styleSheets[0].href;
config.toolbar = [