MichalKleiner

basically when html doesn’t render as html, it needs to be re-typed via DBHTMLText field

MichalKleiner

sort of… but it needs to be applied as you go, not just at the end.. otherwise it becomes string and the information is lost.

taocean

@MichalKleiner that's for the suggestion. That works as desired.

taocean

That's more or less what $casting should do?

MichalKleiner

or just where you’re creating the param array… 'content' => DBHTMLText::create()->setValue($content),

MichalKleiner

if you try this…

  1. if (isset($content)) {
  2. $content = DBHTMLText::create()->setValue(ShortcodeParser::get_active()->parse($content));
  3. }
taocean

It should more than likely parse the html inside the shortcode tags, right? The shortcode works correctly except for the the html not being rendered as html in the $content of the shortcode https://docs.silverstripe.org/en/4/developer_guides/extending/shortcodes/#attribute-and-element-scope