Page 1 of 1

2 Problems: Adding Custom Classes and textarea not usable

PostPosted: Mon Apr 26, 2010 5:18 pm
by crazycat

This is the first time i am trying wymeditor and it is pretty cool. But i am having a couple of problems:

1. The textarea i applied the wymeditor class to becomes unusuable from PHP or from the form's "reset" button. It works just fine without wymeditor class.

2. I just can't add nor modify styles.css to include my own style definitions. No matter what i do, it didnt seem to work at all. Here is my code

Code: Select all
<script type="text/javascript" src="editor/jquery.js"></script>
<script type="text/javascript" src="editor/jquery.ui.resizable.js"></script>
<script type="text/javascript" src="editor/jquery.wymeditor.min.js"></script>
<script type="text/javascript" src="editor/plugins/hovertools/jquery.wymeditor.hovertools.js"></script>
<script type="text/javascript" src="editor/plugins/resizable/jquery.wymeditor.resizable.js"></script>
<script type="text/javascript">

jQuery(function() {
        /*html: '<p>Hello, World!<\/p>', //set editor's value*/
        stylesheet: 'editorstyles.css',      //styles to load
        skin: 'silver',                //activate silver skin
        postInit: function(wym) {

            wym.hovertools();          //activate hovertools
            wym.resizable();           //and resizable plugins


and the textarea which is inside a form:
Code: Select all
<textarea rows="25" cols="90" name="content" class="wymeditor">{$_POST[content]}</textarea>

hope i am clear.

Re: 2 Problems: Adding Custom Classes and textarea not usable

PostPosted: Sun May 16, 2010 11:28 am
by mr_lundis

1. That's because WYMeditor hides your textarea to show the editor iframe and controls, in other words the editor itself is not a form element and you'll manually need to make sure that the original textarea gets updated. You can do this by adding the class wymupdate to any elements that you want trigger an update of the original textarea when clicked, alternately you can change the updateSelector and updateEvent. ... pdateEvent

2. Clear your cache (Ctrl+F5 in most browsers), also make sure you're editing the correct file (wymeditor/iframe/default/wymiframe.css).

Cheers! ;)