Skip to content

Commit

Permalink
Update documentation.html
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAnonymusz authored Jan 15, 2020
1 parent 942bdb0 commit 1261092
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion examples/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,26 @@ <h2>How to enable image upload(s)!?</h2>
</pre>
</div>
<!-- How to Enable Image Uplaod(s) -->
<!-- How to get the value of the editor -->
<div class="col-md-12 bg-dark text-white mt-3 mb-3 pt-3 pb-3 rounded shadow">
<h2>How to get the value of the editor!?</h2>
<p>If you have specified the <code>content_class</code> you can get the value of the editor the following way:</p>
<pre class="line-numbers">
<code class="language-javascript">
// Call the editor
$('#example-id').bbcodeditor({
// ...
content_class: "example-id-content",
// ...
});

// This will insert the value of the editor in the console
console.log($('#example-id-content').val());
</code>
</pre>
<p>The <code>content_class</code> will be outputed as an ID so you must use the <b>#</b> operator to access it. You can get the value of it with the following code <code class="language-javascript">$('#example-id-content').val()</code>. <i class="text-danger"><u>This is just an example!</u></i></p>
</div>
<!-- How to get the value of the editor -->
</div>
</div>
<!-- BODY -->
Expand Down Expand Up @@ -234,4 +254,4 @@ <h2>How to enable image upload(s)!?</h2>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/components/prism-php.min.js"></script>
<!-- JS -->
</body>
</html>
</html>

0 comments on commit 1261092

Please sign in to comment.