Technical Issues => tiny mce => Topic started by: admin on March 03, 2016, 06:18: PM

Title: Quickly adding TinyMCE to a page and textarea field
Post by: admin on March 03, 2016, 06:18: PM
Upload the /tiny_mce/ directory to where you want it and make sure red area is pointing to it correctly

The Add this to the head area:

<!-- TinyMCE -->
<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
   tinyMCE.init({
      mode : "textareas",
      theme : "simple",
      width: "400px",
      height: "300px",
      editor_selector : "reg_note"
   });
</script>
<!-- /TinyMCE -->

The editor_selector is the textarea name and also add it as the class for the textarea itself

 <textarea name="reg_note" class="reg_note" id="reg_note">

<?php echo $row_rsreg['reg_note']; ?>

</textarea>


Thats it the simple text editor should show up now in the textfield you wanted it to work with.

If it is not make sure red section is pointing to the tiny_mce directory correctly.
Adjust Width and height as you want
Sorry, the copyright must be in the template.
Please notify this forum's administrator that this site is missing the copyright message for SMF so they can rectify the situation. Display of copyright is a legal requirement. For more information on this please visit the Simple Machines website.