Uncaught TypeError: $ (& hellip;). Tinymce is not a function

advertisements

Can any on help me?

I get this error with an tinymce form

$(document).ready(function () { 

if (typeof(base_url) == "undefined") {
    var base_url = location.protocol + '//' + location.host + '/';
}

$("#additional-information").tinymce({
    script_url : 'http://sab-solutions.com/phpformbuilder/plugins/tinymce/tinymce.min.js',
    document_base_url: base_url,
    relative_urls: false,
    theme: "modern",
    language: 'fr_FR',
    element_format: "html",
    menubar: false,
    plugins: [
        "autolink autoresize charmap contextmenu link lists paste table"
    ],
    entity_encoding : "raw",
    contextmenu: "link inserttable | cell row column deletetable",
    toolbar: "undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | link",
    schema: "html5"
});

    });

The form are in this website sab-solutions.com/site/emploi.php

Thank you advance


You need to include a reference to the tinyMCE JS library. They have a version hosted on CDN at //cdn.tinymce.com/4/tinymce.min.js, you can download it manually, or use a package manager like bower.

To refernece an external javascript file use the script tag with a src attribute:

<script src="//cdn.tinymce.com/4/tinymce.min.js" type="text/javascript"></script>