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
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 = [