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

Real time saver and great Component Builder tool ! I have been developing with J-Cook Pro Component Builder for several months now and can say with all honesty that this product/service is second to none. The product is feature rich and is being improved and added to all the time. Do yourself a favor if you need to build a Joomla! Component then you can do no wrong in trying the product. You will save on time and effort while being able to deliver your project on time. J-Cook pro does the hard work for you you then have the freedom to fully customise the end result for your own needs. 

One word: Awesome.
Edwardcox (JED)
         

Get Started