I would like to use Ext\'s String method on some text that will be output to the view.
For example:
itemTpl: [
...
\'
Note: The example below does not work as expected! Look at zelexir answer for clarification!
You can use memberfunctions
itemTpl: [
...
'',
'',
'{post_text_teaser}
',
'{timestamp}
',
'',
'{[this.doAction(post_text_teaser)]}
',
...,
{
// XTemplate configuration:
disableFormats: true,
// member functions:
doAction: function(name){
return Ext.String.ellipsis(name + "\", 4);
}
}
]