I’m editing a custom plugin in order to be able to customize how heading & paragraph nodes appear in the Structured Text editor.
I’ve followed this example in the docs in order to use the customBlockStylesForStructuredTextField()
hook and tried to update the heading 2 node by doing something like:
customBlockStylesForStructuredTextField() {
return [
{
id: 'heading-2',
node: 'heading',
label: 'Heading 2',
level: 2,
appliedStyle: {
fontSize: '8rem',
},
},
]
},
which made no difference, so I tried following the example exactly by doing:
customBlockStylesForStructuredTextField(field: Field, ctx: FieldIntentCtx) {
return [
{
id: 'emphasized',
node: 'paragraph',
label: 'Emphasized',
appliedStyle: {
fontFamily: 'Georgia',
fontStyle: 'italic',
fontSize: '1.4em',
lineHeight: '1.2',
}
}
];
},
and it made no change to the editor- no difference in italic text, no new “Emphasized” option in the heading/ paragraph dropdown like there is in the video example.
(Moderator note: Removed empty boilerplate text)