I'm creating some initial content for my add-on using plone.app.contenttypes and plone.api.
I'd like to create a Document (page) with some initial HTML. Here is my code:
homepage = api.content.create(
container=site,
type='Document',
text=RichTextValue("""
<p style="text-align: center; ">
Some text
</p>
"""),
title='WELCOME!',
format='text/html',
)
Problem is that it seems that the content type is not correctly set to text/html, so when the user (an Editor) navigates to edit the page, TinyMCE does not fire up, and the Text Format combo-box in the edit form shows "text/x-plone-outputfilters-html" (manually changing to "text/html" makes TinyMCE appear).
What am I doing wrong?