humhub / legal

3 stars 8 forks source link

replace depreciated MarkdownField widget with new RichTextField widget #22

Closed marc-farre closed 3 years ago

marc-farre commented 3 years ago

Yes! For rendering, I will replace MarkdownView::widget(['markdown' => $page->content]) with RichText::output($page->content). But I'm not sure what postProcess is for...

buddh4 commented 3 years ago

After saving the record related to the richtext content you need to call RichText::postProcess($content, $record). This will make sure e.g. that mentionings, file upload attachments etc. are processed. Not doing this will result in unattached file uploads and other problems.

marc-farre commented 3 years ago

Thanks. Done second commit.