21282 Posts in 5730 Topics by 2601 members
| Go to End | Next > | |
| Author | Topic: | 907 Views |
-
How can I manipulate HTMLText Content?

7 October 2010 at 4:10am
I want to create a special function to manipulate HTMLText Content.
So this should return the manipulated $Content
$Content.Foobar -
Re: How can I manipulate HTMLText Content?

7 October 2010 at 4:26am
Thats where the TextParser is for
http://doc.silverstripe.org/recipes:syntax-highlighting#text-parser
Simple example I use :
-
Re: How can I manipulate HTMLText Content?

7 October 2010 at 4:53am
Thanks! Does it also work for Varchar?
-
Re: How can I manipulate HTMLText Content?

7 October 2010 at 5:24am
I tried to apply it to a TextField, but that does not seems to work...
-
Re: How can I manipulate HTMLText Content?

7 October 2010 at 5:35am
If you were to look at the docs or the code it would be obvious that the Parse method is only in 'class Text'
http://api.silverstripe.org/trunk/sapphire/model/Varchar.html
http://api.silverstripe.org/trunk/sapphire/model/Text.html -
Re: How can I manipulate HTMLText Content?

7 October 2010 at 5:40am
Trying was quicker at the moment ;)
-
Re: How can I manipulate HTMLText Content?

7 October 2010 at 5:46am
Martijn the comment wasn't really directed at you, it was for others I feel the need to remind of how easily something can be checked in help / api docs / code.
Personally I use netbeans it is very fast to check code for an existing method (as the code completion is correct and fast) and the for docs I keep a short cut to http://api.silverstripe.org/trunk/elementindex.html and Ctrl+F searches fast too.
-
Re: How can I manipulate HTMLText Content?

7 October 2010 at 7:49am
Is there a way to do this that would work with Varchar as well as Text and HTMLText?
| 907 Views | ||
| Go to Top | Next > |



