WYSIWYG WYMEditor - Cant get to load

605 Views Asked by At

This is my code:

http://jsfiddle.net/Y6Lc4/

This is my load code:

jQuery(function() {
    jQuery('.wymeditor').wymeditor();
});
​

Why oh why does this not work?! I've copied the code from the demo site!

2

There are 2 best solutions below

0
On BEST ANSWER

Your jsfiddle has two problems:

  1. According to Issue 365, WYMeditor 1.0.0b3 doesn't work with jQuery 1.8.x in Chrome/Safari. You'll have to either use a different versions of jQuery, a different browser, or wait for 1.0.0b4.

  2. Because of the same-origin policy with regards to AJAX, you can't actually load WYMeditor using source hosted somewhere else. This is a limitation of browser security and the method that WYMeditor uses to load skins and translation files within its iframe.

4
On

You haven't loaded the jQuery library...

you can download it from here JQuery

then add it before your editor. Or if you prefer, link from the Google developers site

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>

Update:

There demo site shows you need JQuery too... this is from the source on this page

<!-- jQuery library is required, see http://jquery.com/ -->