Basically what I have done is clear all the "htmlHtml, boxHtml, etc." attributes and put everything in a view:
- Code: Select all
<div class="wym_box wym_skin_default">
<div class="wym_tools wym_section wym_buttons">
<h2>Tools</h2>
<ul>
<li class="wym_tools_save"><a href="">Save</a></li>
<li class="wym_tools_strong"><a title="Strong" name="Bold" href="#">Strong</a></li>
<li class="wym_tools_emphasis"><a title="Emphasis" name="Italic" href="#">Emphasis</a></li>
<li class="wym_tools_ordered_list"><a title="Ordered List" name="InsertOrderedList" href="#">Ordered List</a></li>
<li class="wym_tools_unordered_list"><a title="Unordered List" name="InsertUnorderedList" href="#">Unordered List</a></li>
<li class="wym_tools_link"><a title="Link" name="CreateLink" href="#">Link</a></li>
<li class="wym_tools_unlink"><a title="Unlink" name="Unlink" href="#">Unlink</a></li>
<li class="wym_tools_image"><a title="Image" name="InsertImage" href="#">Image</a></li>
<li class="wym_tools_undo"><a title="Undo" name="Undo" href="#">Undo</a></li>
<li class="wym_tools_redo"><a title="Redo" name="Redo" href="#">Redo</a></li>
<li class="wym_tools_paste"><a title="Paste from Word" name="Paste" href="#">Paste from Word</a></li>
</ul>
</div>
<div class="wym_area_main">
<div class="wym_html wym_section" style="display: none;">
<h2>Source code</h2>
<textarea class="wym_html_val"/>
</div>
<div class="wym_iframe wym_section">
<iframe onload="this.contentWindow.parent.WYMeditor.INSTANCES[0].initIframe(this)" src="/page/iframe.html"/>
</div>
<div class="wym_status wym_section"><h2>Status</h2></div>
</div>
</div>
Now when I click on my attached instance (#content) everything disappears. Could someone help explain exactly how WymEditor is replacing the original HTML and building the HTML for the editor?