JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
cke_wfpl_images: found correct incantation to insert
[wfpl-cms.git] / admin_pages.html
index 7db5cb7..705caff 100644 (file)
                                break;
                        }
                        CKEDITOR.dialog.getCurrent().hide(); // FIXME
-                       console.log(code);
-                       editor.insertHtml(code);
+                       editor.insertElement(CKEDITOR.dom.element.createFromHtml(code));
                }
                CKEDITOR.plugins.add('wfpl_images', {
                        init: function (editor) {
                                                                elements: [
                                                                        {
                                                                                type: 'html',
-                                                                               html: '<div class="cke_wfpl_images_dialog"><p>Note: If the image you want is not shown below, go to the control panel, then "manage images" and add it there. Next time you load an editor, you\'ll see that new image below.</p>'
+                                                                               html: '<div class="cke_wfpl_images_dialog">'
                                                                                        + '<h3>Step 1: Choose an image to insert:</h3>'
                                                                                        + "<div class=\"cke_wfpl_thumbs\">~wfpl_images {~ <div class=\"cke_wfpl_thumb\" onclick=\"return window.cke_wfpl_images_thumb_click("+plugin_id+", this, ~id~)\" style=\"background-image: url(~image thumb_src attr jsdq~)\">~caption empty {~~name html jsdq~~}~~caption nonempty {~~caption html jsdq~~}~</div>~}~</div>"
                                                                                + "</div>"
+                                                                               + '<p style="white-space: normal">If you\'d like to insert an image not shown above, you can <a style="color: blue; text-decoration: underline" href="admin_images?new=1" target="_blank">upload it here</a>. Sorry, it won\'t appear here until you reload this editor page (hit Save below, then "edit this page" again.)</p>'
                                                                        }
                                                                ]
                                                        }