如何检索TinyMCE的值

how to retrieve the value of TinyMCE

本文关键字:TinyMCE 的值 检索 何检索      更新时间:2023-09-26

我在'textarea'中有问题,我想取"TinyMCE"的值,我怎么能用jquery取"TinyMCE"的值

<td>
  <textarea id="body" name="body" rows="20" cols="50" class="mceEditor"><c:out value="${article.body}"/></textarea>
  <form:errors path="body" cssClass="fieldError"/>
</td>

firebug

之后的代码
<table id="body_editor_tbl" class="mceLayout" cellspacing="0" cellpadding="0" style="width: 341px; height: 303px;">
  <tbody id="">
    <tr class="mceFirst">
    <tr class="mceLast">
    <td class="mceIframeContainer mceFirst mceLast">
      <iframe id="body_editor_ifr" frameborder="0" src="javascript:""" style="width: 100%; height: 257px;">
        <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
        <html>
          <head xmlns="http://www.w3.org/1999/xhtml">
          <body id="tinymce" class="mceContentBody " spellcheck="false" dir="ltr">
            <br mce_bogus="1">
          </body>
        </html>
      </iframe>
    </td>
  </tr>
</tbody>
</table>

如何检索TinyMCE的值,Karenasaya想要在tinymce没有值时发出一个消息,如果没有值

将被忽略。

这将为您提供一个定时编辑器的内容

$('#your_editor_id').tinymce().getContent());