From 12162e9634cf516b4ec2b573691a3422576fe30a Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Tue, 23 Jun 2015 15:44:26 -0400 Subject: [PATCH] merge multiple ckeditors on one page fix --- admin_pages.html | 8 ++++---- styl.styl | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/admin_pages.html b/admin_pages.html index f47aac2..ca44429 100644 --- a/admin_pages.html +++ b/admin_pages.html @@ -65,8 +65,8 @@ { thumb: "~image thumb_src jsdq~", image: "~image image_src jsdq~", - image_width: "~image image_width~", - image_height: "~image image_height~", + image_width: ~image image_width~, + image_height: ~image image_height~, sizes: "~sizes jsdq~", caption: "~caption jsdq~" }~ sep {~,~}~~}~ @@ -148,7 +148,7 @@ break; } CKEDITOR.dialog.getCurrent().hide(); - editor.insertElement(CKEDITOR.dom.element.createFromHtml(code)); + CKEDITOR.currentInstance.insertElement(CKEDITOR.dom.element.createFromHtml(code)); } CKEDITOR.plugins.add('wfpl_images', { init: function (editor) { @@ -225,8 +225,8 @@ function make_wysiwyg(name) { CKEDITOR.replace(name, { 'contentsCss': 'style.css?m=~style.css mtime~', - bodyId: '~$basename~' + '-wysiwyg-' + name, 'allowedContent': true, + bodyId: '~$basename~' + '_wysiwyg_' + name, 'stylesSet': [ { name: 'Paragraph', element: 'p'}, { name: 'Page Headline', element: 'h1'}, diff --git a/styl.styl b/styl.styl index bf86721..f5e96ba 100644 --- a/styl.styl +++ b/styl.styl @@ -135,11 +135,11 @@ body // expand the ckeditor widget so there's space for the content to be exactly // the size of the content outside the editor -#cke_content +.cke margin-right: -15px margin-left: -15px // tag within ckeditor -#admin_pages-wysiwyg-content +#admin_pages_wysiwyg_content background: content_bg width: content_width margin: 0 auto -- 1.7.10.4