Home > Blog >


Contact Us



Have a mobile app idea or want to benefit from our web solutions ?


info@techaheadcorp.com

How to add a rich text editor in Joomla? (for your own component)

If you have created an admin section in your newly designed Joomla! component, or you have a frontend page where you want your website users to write something cool using an RTE, like this one, its just a few lines of code.

Assuming you are using MVC design pattern in Joomla! Extension development. Suppose,

Component Name = cmp

View Name = vvv

So we must have a class named cmpViewvvv (Learn more on naming conventions for classes in Joomla!)

Code for view.html.php

<?php class cmpViewvvv extends JView { function display($tpl = null){ $editor =& JFactory::getEditor(); $this->assignRef('editor', $editor); } } ?>

Code for default.php

<?php defined( '_JEXEC' ) or die( 'Restricted Access' ); ---- ---- ---- ?> <form action="index.php" method="post"> ---- ---- ---- <?php echo $this->editor; ?> ---- ---- ---- </form>

Easy

If you enjoyed this post, please consider subscribing to the RSS feed to have future articles delivered to your feed reader.

Article by Jitin Narang

Jitin Narang is COO at TechAhead Software, a leading Mobile & Web Application Development company which helps brands to reach, connect, interact with their audience through web and mobile effectively. You can contact him on Google+, Twitter and LinkedIn. Read all articles written by him Reach us for Custom Mobile Applications ( iPhone, iPad, Android, Windows) and Web Applications ( Open Source, Dot Net, Java ) requirements. Read 17 articles by
  • http://windof.aientrance.com/2011/09/22/best-design-of/ konkursy

    I haven’t looked at your page since September and I’m surprised that I can see so many new things. The articles are super and the graphics and pictures just wonderful! I can’t take my eyes from your site Feel free to look at my blog!

  • http://garmin1490t.com/garmin1490t garmin 1490t

    Useful stuff, but the theme don’t display correctly on my Powerbook…maybe you ought to examine that out. Thanks, anyway.

Stay Connected


          
Subscribe via Email


 

Subscribe