How can I pre-raw a Model attribute for the Twig template? (ie. "myModel.myAttr" without requiring the raw filter) I have a model that returns markup as part of a variable. To escape twig's encoding we have to include the raw filter, like so : 

{{ entry.customField | raw }}


The encoded output of that field is never useful, so ideally we'd have a way to get the same result without that twig filter. ie : 

{{ entry.customField }}


Looking at the various twig and template components I doubt this is possible, but is there any hidden ways to get this working? 

This is all designed to remove that extra requirement from the usage, so wrapping unescape tags around it isn't want I'm looking for.
The easiest way i've found to do that is to use TemplateHelper::getRaw()

So in your "prepValue" function inside your fieldtype class do something like this

function prepValue($value) {
    //any other data manipulation stuff
    return TemplateHelper::getRaw($value);
}


More info on prepValue in the docs.