Tinymce 4 image upload is not working as it should be

Im trying to use Tiny mce4 but its not working correctly.

I read the documentation and then I use an example that is available in tinymce website.

The script is already working but my elements are a bit without formatting, as you can see in image below, and for example on insert/edit image I dont have the search button to choose an image.

enter image description here

Do you know why this might happening? Because Im using the tinymce example that you can see here, and in the tinymce website works fine, but with me is not working so good!

The code I´m using is the same of that example, and its this:

Here I invoke my tinymce.min.jse and I start tinymce:

<script type="text/javascript" src="tinymce/js/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
        selector: "textarea",
        plugins: [
                "advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker",
                "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
                "table contextmenu directionality emoticons template textcolor paste fullpage textcolor"
        ],

        toolbar1: "newdocument fullpage | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect formatselect fontselect fontsizeselect",
        toolbar2: "cut copy paste | searchreplace | bullist numlist | outdent indent blockquote | undo redo | link unlink anchor image media code | inserttime preview | forecolor backcolor",
        toolbar3: "table | hr removeformat | subscript superscript | charmap emoticons | print fullscreen | ltr rtl | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft",

        menubar: false,
        toolbar_items_size: 'small',

        style_formats: [
                {title: 'Bold text', inline: 'b'},
                {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
                {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
                {title: 'Example 1', inline: 'span', classes: 'example1'},
                {title: 'Example 2', inline: 'span', classes: 'example2'},
                {title: 'Table styles'},
                {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
        ],

        templates: [
                {title: 'Test template 1', content: 'Test 1'},
                {title: 'Test template 2', content: 'Test 2'}
        ]
});</script>

</head>

Then I have my form:

<form method="post" action="somepage">
    <textarea name="content" style="width:100%"></textarea>
</form>

11 thoughts on “Tinymce 4 image upload is not working as it should be”

  1. What you see in the site is moxiemanager plugin used with tinymce editor for image upload. It is not freely available.

    There are lot of plugins for image uploading – php + tinymce do little research you be on your way implementing.

    for image uploading – rails + tinymce the best one out is PerfectlyNormal and for more information I have implemented check this out.

    Reply

Leave a Comment