-// 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
+// call this for each ckeditor on each page
+ckeditor(basename, element_name, width)
+ // ckeditor ui, including border around wysiwyg area
+ #{basename}_body #cke_{element_name}
+ margin-left: -15px
+ if width < 650px
+ width: 680px
+ else
+ width: width + 30px
+ // body tag of the wysiwyg area
+ #{basename}_wysiwyg_{element_name}
+ background: content_bg
+ width: width
+ margin: 0 auto
+ if width <= 600px
+ min-width: 0
+ width: width
+ margin: 0 auto
+ border-right: 20px solid #eee
+ border-left: 20px solid #eee
+ border-top: 1px solid #eee
+ border-bottom: 1px solid #eee
+ min-height: 250px
+
+ckeditor('admin_pages', 'content', content_width)