4

I used the TinyMCE editor successfully and I am happy with it. Now I need the option that users can insert images into their written text. For that purpose I wanted to use JustBoil so that they can upload and eventually insert their images into the text. This is my current tinymce.init() setup

<script type="text/javascript">
tinymce.init({
    selector: "textarea",
    theme: "modern",
    plugins: [
        "advlist autolink lists link image preview hr",
        "searchreplace wordcount visualblocks visualchars fullscreen",
        "insertdatetime media nonbreaking save table contextmenu directionality",
        "paste textcolor colorpicker textpattern imagetools jbimages"
    ],
    toolbar1: "insertfile undo redo | bold italic | forecolor backcolor | link image jbimages",
    toolbar2: "alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent ",
    image_advtab: true,
    relative_urls: false
});
</script>

The upload image button exists now but as soon as I hit the button, the index.php gets offered for download, which obviously shouldn't be the case. When I decline the download and try to use the image upload through the Browse button I eventually receive following message:

Upload in progress…

This is taking longer than usual.

An error may have occurred.

View script's output

By the way, this is the script's output:

The connection was reset

The connection to the server was reset while the page was loading.

The site could be temporarily unavailable or too busy. Try again in a few moments

Do you guys have similar experiences with this and are maybe able to help me out with this one? Any help is highly appreciated! Please tell if I shall provide more information.

Community
  • 1
  • 1
ZedsWhatSheSaid
  • 467
  • 2
  • 9
  • 23

1 Answers1

0

When you hit upload, 'init' block of 'editor_plugin.js' is invoked. You may open 'editor_plugin_src.js' for readability.

This js file, in turn loads 'dialog.htm' . In this dialog.htm file, set the form upload options. for form action set the path to uploader. I am using Code igniter, and they include the codeigniter code in their github repo.

vishwakarma09
  • 254
  • 3
  • 17