I am attempting to create system managed posts that utilize raw html on a website plugin (in development). Looking at the documentation and various posts, I think I took the right approach, however the preprocessor still <code>'s out various parts of my post.
This is how it turns out:
This is how it should turn out (I edited in browser):
This is the code I am using to create the post:
post = PostCreator.new(Discourse.system_user,
title: mmbill.getTitle(),
raw: cooked,
cooked: cooked,
cook_methods: Post.cook_methods[:raw_html],
archetype: 'regular',
created_at: createdAt,
skip_validations: true,
category: Mmbill.getCatId(),
is_warning: false,
meta_data: { mm_type: 'bill', mm_id: final[:bill_id] },
shared_draft: false,
topic_opts: {}
)
Thank you for any help you have to offer!