Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

HTML in textarea 24 Jan 2012 19:39 #1061

adding HTML to textarea gets stripped out during save, is there an easy way to allow html in selected textarea fields?

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

Re: HTML in textarea 24 Jan 2012 20:40 #1062

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Yes, choose the "Rich-text" datatype.
Coding is now a piece of cake

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

Re: HTML in textarea 24 Jan 2012 20:50 #1063

This causes the editor to load I am trying to have plain text and html sniplets included - in joomla I think there is a flag for allowing html in text

Thanks!

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

Re: HTML in textarea 25 Jan 2012 18:32 #1088

In joomla there is extensive use of xml files for fields and forms, according to what I could find there is a filter="raw" that can be added to allow html in a textarea however I am not sure where to add this. Any suggestions will be gratefully appreciated.

Thanks!

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

Re: HTML in textarea 09 Mar 2012 15:08 #1538

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
In your controller :

function save() AND apply()

// Check for request forgeries
JRequest::checkToken() or jexit( 'Invalid Token' );

$cid = JRequest::getVar( 'cid', array(), 'post', 'array' );
$post	= JRequest::get('post');
$post['id'] = (int) $cid[0];

//HERE THE SYNTAX
$post['my_rich_text'] = JRequest::getVar('my_rich_text', '', 'post', 'string', JREQUEST_ALLOWRAW);



And...
in the check() function of your table file, don't apply any filter on it (as the others typed fields)
Coding is now a piece of cake
The following user(s) said Thank You: duetltd

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

Re: HTML in textarea 20 Mar 2012 01:19 #1672

Your suggestion works perfectly - thank you!!! I have learned more about joomla here than every where else put together!

Thanks for all the help!

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

Re: HTML in textarea 20 Mar 2012 06:27 #1674

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Thank you for your interrest and your incouragements.

Best regards.
Coding is now a piece of cake

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

  • Page:
  • 1
Time to create page: 0.068 seconds

  Merci d'avoir présenté ce service web générateur de composant joomla. L'interface est très conviviale on a le plaisir du drag&drop et c'est assez rare pour être signalé. Je souhaite que ce projet connaisse un fort succès votre réalisation est méritante.
Yann Gomiero (AFUJ - France)

Get Started