contentReturns: string | editor

Get or set html content in the body.

Parameters

NameTypeDescription
html {string} The html content that needs to be set.

Examples

Get

    
 <button class="gj-button-md" onclick="alert($editor.content())">Get Content</button>
 <hr/>
 <div id="editor">My <b>content</b>.</div>
 <script>
     var $editor = $('#editor').editor();
 </script>

  

Set

    
 <button class="gj-button-md" onclick="$editor.content('<h1>new value</h1>')">Set Content</button>
 <hr/>
 <textarea id="editor"></textarea>
 <script>
     var $editor = $('#editor').editor();
 </script>