JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
set unique id= on each ckeditor's <body>
authorJason Woofenden <jason@jasonwoof.com>
Thu, 2 Apr 2015 00:47:58 +0000 (20:47 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Thu, 2 Apr 2015 00:47:58 +0000 (20:47 -0400)
admin_pages.html
admin_pages.php
styl.styl

index 9bd863a..f47aac2 100644 (file)
                function make_wysiwyg(name) {
                        CKEDITOR.replace(name, {
                                'contentsCss': 'style.css?m=~style.css mtime~',
                function make_wysiwyg(name) {
                        CKEDITOR.replace(name, {
                                'contentsCss': 'style.css?m=~style.css mtime~',
+                               bodyId: '~$basename~' + '-wysiwyg-' + name,
                                'allowedContent': true,
                                'stylesSet': [
                                        { name: 'Paragraph', element: 'p'},
                                'allowedContent': true,
                                'stylesSet': [
                                        { name: 'Paragraph', element: 'p'},
index ae6e4c4..f712444 100644 (file)
@@ -98,6 +98,7 @@ function admin_pages_main_form($id = false) {
                tem_set('id', $id);
        }
 
                tem_set('id', $id);
        }
 
+       tem_set('$basename', 'admin_pages');
 
        $navbar_options = array(array('ignored', 'Not at all'), array('0', 'First'));
        $rows = db_get_rows('cms_pages', 'id,coalesce(nullif(nav_title,\'\'), title) as title,navbar', 'where navbar != 0 order by navbar');
 
        $navbar_options = array(array('ignored', 'Not at all'), array('0', 'First'));
        $rows = db_get_rows('cms_pages', 'id,coalesce(nullif(nav_title,\'\'), title) as title,navbar', 'where navbar != 0 order by navbar');
index 72c2e05..2ac584a 100644 (file)
--- a/styl.styl
+++ b/styl.styl
@@ -4,8 +4,7 @@
 // dimensions
 site-width = 934px // inside the shadow
 site-padding = 30px
 // dimensions
 site-width = 934px // inside the shadow
 site-padding = 30px
-sidebar-width = 220px
-content-width = (site-width - (site-padding * 3) - sidebar-width)
+content-width = (site-width - (site-padding * 2))
 font-size-normal = 15px
 font-size-small = 13px
 font-size-tiny = 11px
 font-size-normal = 15px
 font-size-small = 13px
 font-size-tiny = 11px
@@ -131,23 +130,20 @@ p.attrib, p.attribution
 body
        margin: 0
        padding: 0
 body
        margin: 0
        padding: 0
+       background: window-bg
        color: content-fg
        font: font-size-normal Arimo, Arial, sans-serif
 
        color: content-fg
        font: font-size-normal Arimo, Arial, sans-serif
 
-       // Styles for the <body> tag within ckeditor
-       background: content-bg
-       width: content-width
-       margin: 0 auto
-       &.real_body_tag // revert the above for the <body> on the real site
-               background: window-bg
-               width: auto
-               margin: 0
-
 // expand the ckeditor widget so there's space for the content to be exactly
 // the size of the content outside the editor
 #cke_content
        margin-right: -15px
        margin-left: -15px
 // expand the ckeditor widget so there's space for the content to be exactly
 // the size of the content outside the editor
 #cke_content
        margin-right: -15px
        margin-left: -15px
+// <body> tag within ckeditor
+#admin_pages-wysiwyg-content
+       background: content-bg
+       width: content-width
+       margin: 0 auto
 
 // outermost div for centering, shadow, etc
 #centerer
 
 // outermost div for centering, shadow, etc
 #centerer