Jeremysavoy (talk | contribs) (New page: 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 edito...) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
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. | 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= | ||
+ | <pre> | ||
+ | // 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>"; | ||
+ | } | ||
+ | </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>"; }