Answers.Body: <p>I'm not 100% sure I follow, but I think this is what you are looking for.</p>
  
  <p>In your javascript file, you'll want <code>code.set</code></p>
  
  <p><a href="https://imperavi.com/redactor/docs/api/code/" rel="nofollow">API Reference</a></p>
  
  <pre><code>...
  
  $('#yourTextArea').redactor('code.set', your.data);
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-08T11:33:45.440Z
Answers.Text: Ignore my last example in the question. I actually wanted to get the code/text out the the editor/textarea, not set the code. But this works too.
Answers.UserDisplayName: iNalgiev
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-07T02:42:57.443Z
Answers.LastActivityDate: 2016-10-07T02:42:57.443Z
Answers.UserDisplayName: Damon
Body: <p>I'm building a plugin for Craft CMS. This plugin will load on the edit/content page, where the standard Redactor WYSIWYG editor will be loaded too (by CraftCMS).
  I want to get the HTML/text contents of the Redactor editor.</p>
  
  <p>For example <code>tinymce.activeEditor.getContent()</code> will get the HTML contents of the <strong>TinyMCE</strong> editor in WordPress.</p>
  
  <p>How do I achieve this in Craft CMS?</p>
  
  <p>The API documentation says <code>var text = this.clean.getPlainText(html);</code>.
  But how do I know reference to <strong>this</strong>.</p>
  
Tags: <redactor><javascript><content><editor>
Title: I want to get the HTML/text contents of the Redactor editor
ThreadText: # I want to get the HTML/text contents of the Redactor editor
  
  (Asked by: username_0 on 2016-10-06)
  
  I'm building a plugin for Craft CMS. This plugin will load on the edit/content page, where the standard Redactor WYSIWYG editor will be loaded too (by CraftCMS).
  I want to get the HTML/text contents of the Redactor editor.
  
  For example `tinymce.activeEditor.getContent()` will get the HTML contents of the **TinyMCE** editor in WordPress.
  
  How do I achieve this in Craft CMS?
  
  The API documentation says `var text = this.clean.getPlainText(html);`.
  But how do I know reference to **this**.
  
  **Tags:** redactor, javascript, content, editor
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-10-07. Score: 2 | Accepted answer
  
  I'm not 100% sure I follow, but I think this is what you are looking for.
  
  In your javascript file, you'll want `code.set`
  
  [API Reference](https://imperavi.com/redactor/docs/api/code/)
  
  ```
  ...
  
  $('#yourTextArea').redactor('code.set', your.data);
  
  ```
  
  > **Comments:**
  > **username_0**: Ignore my last example in the question. I actually wanted to get the code/text out the the editor/textarea, not set the code. But this works too.  
  
  ---
  
  