JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
merge multiple ckeditors on one page fix
authorJason Woofenden <jason@jasonwoof.com>
Tue, 23 Jun 2015 19:44:26 +0000 (15:44 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Tue, 23 Jun 2015 19:44:26 +0000 (15:44 -0400)
admin_pages.html
styl.styl

index f47aac2..ca44429 100644 (file)
@@ -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 {~,~}~~}~
                                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) {
                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'},
index bf86721..f5e96ba 100644 (file)
--- 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
 // <body> tag within ckeditor
-#admin_pages-wysiwyg-content
+#admin_pages_wysiwyg_content
        background: content_bg
        width: content_width
        margin: 0 auto