21277 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1453 Views |
-
Textarea field

22 February 2011 at 5:24am
Hi guys,
I'm have a small problem usinf the textare field in the admin, the problem is I'm using two textareafields so that I can insert custom css and javascript on a specific page type, the only issue is that it inserts line breaks, paragraph tags and such rather than just plain text.
Any advice would be good thanks.
-
Re: Textarea field

22 February 2011 at 10:13pm
Does it store it formatted like that in the database? (check your database) or is it converting the line breaks etc on the front end? If you're using a TextaraField (over a HtmlEditorField) your database field should be 'Text' rather than html text.
-
Re: Textarea field

23 February 2011 at 2:28am
Hi,
Thanks for the reply, The database looks fine, it's not displaying tags and it's showing " rather than " which is how I'd like, so it's just somehow being pushed out as hmtl.
I'm using this..
'InsertCSS' => 'Text',
$fields->addFieldToTab('Root.Content.Main', new TextareaField('InsertCSS', 'Insert css'),'Content');
-
Re: Textarea field

24 February 2011 at 9:48am
Did you try to use 'InsertCSS' => 'HTMLText' instead?
HTMLText adds HTML only if you manually add tags to the Textarea field, whereas Text seems to try and convert linefeeds and stuff to HTML...
-
Re: Textarea field

24 February 2011 at 3:11pm
If the front end is pushing out the wrong thing try $InsertCSS.RAW to get the raw content from the db. Note you shouldn't use RAW for some user input as it can exploit the website.
| 1453 Views | ||
|
Page:
1
|
Go to Top |


