sheadawson / silverstripe-shortcodable

Provides a GUI for CMS users to insert Shortcodes into the HTMLEditorField + an API for developers to define Shortcodable DataObjects and Views.
MIT License
48 stars 36 forks source link

Exclude shortcode parsing from DBField #57

Closed faloude closed 6 years ago

faloude commented 7 years ago

Inside my DataObject I have method that returns some HTML to be displayed inside the object's summary_field. For the HTML to be rendered (instead of being output as raw text) I use return DBField::create_field('HTMLText', $summary);.

Now the issue is that $summary contains shortcodes, and they are being parsed in the gridfield resulting in complete galleries / forms inside a gridfield.

Is there an easy way to switch off shortcode parsing for the specific DBField (or HTMLText) instance? (or even better, a way to replace them with an image)