The problem seems to be that when I save my form, the textarea that the data is entered into is ignored by the form.
In my example below, if I have WymEditor off - it works, the (cut down) form looks like this:
- Code: Select all
<form action="/admin/posts/edit/19" method="post" id="PostEditForm"> <fieldset id="main-content">
<legend>Main Content</legend>
<input type="hidden" id="PostId" value="19" name="data[Post][id]"/>
<div class="input required">
<label for="PostTitle">Title</label>
<input type="text" id="PostTitle" value="Will This Work" maxlength="255" class="required" name="data[Post][title]"/>
</div>
<div class="input required">
<label for="PostByline">Byline</label>
<input type="text" id="PostByline" value="I Don't Know" maxlength="255" class="required" name="data[Post][byline]"/>
</div>
<div class="input">
<label for="PostBody">Body</label>
<textarea id="PostBody" class="wymeditor" rows="6" cols="30" name="data[Post][body]">This works, doesn't it?</textarea>
</div>
</fieldset>
</form>
Now, when I enable WymEditor, the textarea changes to:
- Code: Select all
<div class="input">
<label for="PostBody">Body</label>
<textarea id="PostBody" class="wymeditor" rows="6" cols="30" name="data[Post][body]" style="display: none;">This works, doesn't it?</textarea>
<div class="wym_box wym_skin_default">
<div class="wym_area_top">
<div class="wym_tools wym_section wym_buttons">
<h2>Tools</h2>
<ul>
<li class="wym_tools_strong"><a title="Strong" name="Bold" href="#">Strong</a></li>....
</div>
<div class="wym_iframe wym_section">
<iframe onload="window.parent.WYM_INSTANCES[0].initIframe(this)" src="/js/wymeditor/iframe/default/wymiframe.html"/>
</div>
<div class="wym_status wym_section"> </div></div><div class="wym_area_bottom"/></div></div>
I've tried to cut it down as much as possible - but the point is, I can see the data there, and it loads up into the iFrame, but when I try save my post, it seems to be ignores and not put into the array of data I'm saving.
Any ideas?