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.108 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started