Line 14: | Line 14: | ||
$src = "http://localhost/image.php?id=$imageID"; | $src = "http://localhost/image.php?id=$imageID"; | ||
− | echo "<script type='text/javascript'> window. | + | echo "<script type='text/javascript'> window.parent.CKEDITOR.tools.callFunction({$_GET['CKEditorFuncNum']}, '$src'); </script>"; |
} | } | ||
</pre> | </pre> |
Latest revision as of 23:05, 23 October 2009
Not sure if this is the right place to put this, if its not then I apologize in advance.
I'm using CKEditor with Drupal 6 using the wysiwyg api module nightly build and I have the editor working, but there is no upload tab for images and no "browse server" tab either. I found this page and hoped to get some insight on how to get this working - but the instructions didn't give the file to edit with the changes and I could not find these options by grep-ing the source ... please advise, I like your editor very much but without being able to upload images for use in the rich text I simply can't use it.
PHP Example
// file: upload.php if (isset($_FILES['upload'])) { $imageID; // TODO: Store the image into the database, for example. $src = "http://localhost/image.php?id=$imageID"; echo "<script type='text/javascript'> window.parent.CKEDITOR.tools.callFunction({$_GET['CKEditorFuncNum']}, '$src'); </script>"; }