JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
stylus helper for ckeditor sizing
[wfpl-cms.git] / admin_pages.html
index f8309df..ca44429 100644 (file)
@@ -4,11 +4,11 @@
 <head>
        <title><!--~$title show {~-->~$host~ Admin: <!--~listings once_if {~-->Pages Listing<!--~}~--><!--~form {~--><!--~id {~-->Add a new page<!--~}~--><!--~id unset {~-->Edit page "~title html~"<!--~}~--><!--~}~--><!--~}~--></title>
        <!--~$head {~-->
-       <script type="text/javascript" src="code/ckeditor/ckeditor.js"></script>
+       <script src="inc/ckeditor/ckeditor.js"></script>
        <style>
                /* icon in cke buttons */
                .cke_button_icon.cke_button__wfpl_images_icon {
-                       background-image: url(/code/ckeditor/plugins/icons.png?t=D5AC);
+                       background-image: url(/inc/ckeditor/plugins/icons.png?t=D5AC);
                        background-position: 0 -1504px;
                }
                .cke_wfpl_images_dialog * {
                        border: 2px solid #444;
                }
        </style>
-       <script type="text/javascript">
+       <script>
                window.cke_wfpl_images = {
                        images: [~wfpl_images {~
                                {
                                        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) {
                        CKEDITOR.replace(name, {
                                'contentsCss': 'style.css?m=~style.css mtime~',
                                'allowedContent': true,
+                               bodyId: '~$basename~' + '_wysiwyg_' + name,
                                'stylesSet': [
                                        { name: 'Paragraph', element: 'p'},
                                        { name: 'Page Headline', element: 'h1'},
                                        <li>To insert an image: place the cursor at the beginning of a line and click the "insert image" button in the editor. Note that you will only be able to insert images that you have already uploaded on the <a href="admin_images" target="_blank">manage images</a> page.</li>
                                </ul>
                        </div>
-                       <div class="field"><textarea class="html_editor" rows="20" cols="50" id="content" name="content">~content html~</textarea><script type="text/javascript">make_wysiwyg('content');</script></div>
+                       <div class="field"><textarea class="html_editor" rows="20" cols="50" id="content" name="content">~content html~</textarea><script>make_wysiwyg('content');</script></div>
 
                        <div class="caption">Description</div>
                        <div class="field_notes">(Hidden description of this page, primarily for search engines.)</div>