In a custom content type (employees) I have a body field.
In lib\modules\employees\index.js
addFields: [
{
name: 'body',
label: 'Beskrivelse',
type: 'area',
options: {
widgets: {
'apostrophe-rich-text': {
toolbar: ['Bold', 'Italic', 'Link', 'Unlink']
}
}
}
}
]
And in lib\modules\employees-widgets\views\widget.html
{{ apos.singleton(piece, 'body', 'apostrophe-rich-text', {
toolbar: [ 'Bold', 'Italic', 'Link', 'Unlink' ]
})
}}
Editing directly on the page shows the rich text field with toolbar and preview. But in the admin view the toolbar shows, but the preview is not working at all. Look at the images linked bellow:
Apostrophe's admin modal CSS is reset, so rich text areas in the modal do not reflect project level styles. This is in an attempt to keep project level styles from interfering with important Apostrophe UI.
You could always add those admin scopes to your project level CSS, just be aware of its reach.