Skip to main content

WYSIWYG editor in custom field

More
13 years 2 months ago #112220 by ClickWebDesign
Hi,
I need subscript/superscript in a custom field. How do I go about this? What would it take to have a WYSIWYG editor in custom field?

Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #112308 by nicolas
You would have to create a new custom field type via a system plugin. You would implement the onFieldsLoad trigger to add your type in HikaShop and add the class of your type in a myfieldtype_class.php file next to the main file of the plugin. That class would contain the different functions of a custom field type class: __construct getFieldName trans show display JSCheck check
I invite you to look at the file administrator/components/com_hikashop/classes/field.php for some examples.
Code:
class plgHikashopSubuserfield extends JPlugin { function __construct(&$subject, $config) { parent::__construct($subject, $config); } function onFieldsLoad(&$fields) { $me = null; $me->name = 'myfieldtype'; $me->text = 'My field type'; $me->js = 'allTypes["plg.myfieldtype"] = new array("required","default","columnname");'; $fields[] = $me; } } if(defined('HIKASHOP_COMPONENT')) { require_once( dirname(__FILE__).DS.'myfieldtype_class.php' ); }
The following user(s) said Thank You: ClickWebDesign

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #112318 by ClickWebDesign
Thanks Nicolas, very helpful reply, I'll check it out:)

Please Log in or Create an account to join the conversation.

Time to create page: 0.151 seconds
Powered by Kunena Forum