Top of Page
Top of page

Editor Parameter Element

Parameter elements include many different input types. The text type provides a textarea where one could enter raw HTML, but since Joomla! has a built-in method for calling a WYSIWYG editor...why not use it?

<params addpath="path/to/folder/elements">
 ...
 <param type="editor" name="myparam" label="HTML Editor" description="Use the editor" default="HTML Goes Here" />
 ...
</params>
editor.php:
 
<?php
// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();
 
class JElementEditor extends JElement
{
  var $_name = 'editor';
 
  function fetchElement($name, $value, &$node, $control_name)
  {
    $value = str_replace('
', "\n", $value);
    $editor =& JFactory::getEditor();
    return $editor->display( $control_name.'['.$name.']', 
      $value, '80%', '400', '40', '15', null ) ;
  }
}
 
 

Top Downloads

Joomla 1.5

  1. SplashR 23.4%
  2. ByeByeGenerator 16.5%
  3. AdminExile 14.4%
  4. CoolClock 11.9%
  5. ScriptsDown 8.9%
  6. Detect Language 7.7%
  7. Expires Headers 6.8%
  8. Clean Response 4.0%
  9. Answer Tips 2.1%
  10. Authentication - EMail 1.6%
  11. Settler Module 1.1%
  12. Settler Plugin 1.1%
  13. DomainRestriction 0.7%

Joomla 1.6/1.7

  1. AdminExile 17.1%
  2. Top of the Page 12.9%
  3. Favicon Package 11.1%
  4. CoolClock 10.1%
  5. SplashR 8.3%
  6. ByeByeGenerator 8.1%
  7. Detect Language 5.6%
  8. Content - MooAccordion 5.2%
  9. Authentication - EMail 3.5%
  10. Clean Response 3.4%
  11. Password Strength 2.6%
  12. Expires Headers 2.6%
  13. ScriptsDown 1.6%
  14. DomainRestriction 1.5%
  15. Answer Tips 1.5%
  16. Meta Character Count 1.4%
  17. Settler Module 1.0%
  18. Settler Plugin 1.0%
  19. System - Nomad 0.7%
  20. Profiler 0.5%
  21. User - StaticPassword 0.2%
RicheyWeb Extensions have been downloaded 102,705 times.
38 individuals and companies have made donations supporting future development.
Thank you Nestor Buhay!