Text Area Editor

giacall 18 Jul, 2014
Hi to all...

A little info...
It's possible to change the editor in textarea box in CFv5??
Or.. in other words... I'd like to have an editor like the article one.. which have the table button, cause i need to insert and modify some table in a textbox area.

Thank's in advance.
giacall 22 Jul, 2014
Uhmmm..

Nobody can help me??
Max_admin 23 Jul, 2014
Hi giacall,

You mean the editor which is loaded in the CFv5 admin area or the one loaded when you enable the editor setting in the text area ?

In both cases you can't, but for #1 you can simply build your code into another editor then paste it into the textbox!

For #2, you can keep the editor setting disabled and load the editor yourself, every editor has some files and script to load, you may also use a custom element instead and output the Joomla editor using PHP:
>?php
$editor = JFactory::getEditor();
echo $editor->display("name_here", "", "400", "100", "150", "10", 1, null, null, null, array('mode' => 'advanced'));
?>


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
giacall 23 Jul, 2014
Hi Max..

Thank you for your help.

My intention is to have a form in the frontend with a TEXTAREA box where a user can insert text and table. But the standard CFv5 editor (WYSIWYG editor) don't have this functionality... And I would like to prevent the user from trying to insert a table into a textarea box using HTML tags.

This is the reason why i've thinking about the default Joomla editor (TinyMCE editor) which have the table / grid command...

But as I think I understand from your post ... this is not possible ....

I also try your code in a custom element and work.. But load a generic editor with less options than the standard CFv5
Max_admin 27 Jul, 2014
Answer
1 Likes
please try to chnage
array('mode' => 'advanced')

to
array('mode' => 'extended')

?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
giacall 28 Jul, 2014
Hi Max..
Thank for your hint..
I changed the code in custom modulo into

$editor = JFactory::getEditor();
echo $editor->display("Nome del DISPLAY", "", "400", "100", "150", "10", 1, null, null, null, array('mode' => 'extended'));


But nothing changed...
giacall 28 Jul, 2014
But... reading from Joomla Docs Org at this http://docs.joomla.org/JFactory/getEditor,

with the following code

$editor =& JFactory::getEditor();
$params = array( 'smilies'=> '0' ,
                 'style'  => '1' ,  
                 'layer'  => '0' , 
                 'table'  => '1' ,
                 'clear_entities'=>'0'
                 );
echo $editor->display( 'desc', '', '400', '400', '20', '20', false, null, null, null, $params );


The editor is turned on with all param set up correctly...

Thank for your help!!
giacall 28 Jul, 2014
Ops.. sorry.. One last question...
how i can set the FieldID?? When i try to create a database table, i don't see my field id set in the code

echo $editor->display( 'FIELD_NAME', 'FIELD_CONTENT', '400', '100', '10', '10', false, 'FIELD_ID', null, null, $params );
Max_admin 28 Jul, 2014
You mean a database table field for the editor ?

For custom elements/fields you will need to add the field yourself when creating the table, if the table is already created then you will need to change it using phpmyadmin.

But in your case you had already a field, so just use that for your editor!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
giacall 28 Jul, 2014

You mean a database table field for the editor ?


Yes Max.. So in my previous example code, it's enough to add a filed named FILED_NAME when i create the table..

Perfect!!!
Max_admin 28 Jul, 2014
Yes, that's enough if you want to save the editor's value in the database!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.