Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

799
Views
uncaught referenceerror: tinymce is not defined

My JS:

$(document).ready(function() {
  tinymce.init({
    selector: 'textarea',
    height: 500,
    menubar: false,
    plugins: [
      'advlist autolink lists link image charmap print preview anchor',
      'searchreplace visualblocks code fullscreen',
      'insertdatetime media table contextmenu paste code'
    ],
    toolbar: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify |  bullist numlist outdent indent | link image',
    content_css: '//www.tinymce.com/css/codepen.min.css'
  });
});

My HTML:

<textarea></textarea>

I have the following external JS files included:

http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js http://cdnjs.cloudflare.com/ajax/libs/tinymce/4.5.6/jquery.tinymce.min.js

The JS fiddle:

http://jsfiddle.net/bcv1tv1b/

My error:

Uncaught ReferenceError: tinymce is not defined
    at HTMLDocument.<anonymous> ((index):54)
    at j (jquery.min.js:2)
    at Object.add [as done] (jquery.min.js:2)
    at m.fn.init.m.fn.ready (jquery.min.js:2)
    at window.onload ((index):53

I'm running Google Chrome 57.0.2987.133 and the TinyMCE code is from https://www.tinymce.com/docs/demo/basic-example/ .

Any ideas?

about 4 years ago · Santiago Trujillo
3 answers
Answer question

0

You need to also load TinyMCE itself - all you are loading now is a jQuery wrapper for TinyMCE.

In total you need to load the following:

<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.5.6/tinymce.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/tinymce/4.5.6/jquery.tinymce.min.js"></script>

See this updated fiddle: http://jsfiddle.net/mfromin/bcv1tv1b/2/

In all honesty you don't even need the jQuery TinyMCE code unless you want to use TinyMCE as a jQuery Plugin. Its 100% not required to make your fiddle work.

about 4 years ago · Santiago Trujillo Report

0

Had this error with WordPress, Chrome developer tool pointed me to the error. So I checked my files, /wp-includes/js/tinymce/wp-tinymce.php, The folder itself was on full throttle permission, changed to 755 and my visual editor is working now, console error disappeared.

about 4 years ago · Santiago Trujillo Report

0

Check to see if you have some .htaccess files inside your wp-includes folder! I was having this issue and it seems that it was caused by a .htaccess file in the root of wp-includes!

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!