I'm finding the docs fairly dense and convoluted. Can someone point me to or provide an example of using custom labels to achieve inline code formatting.... like this
<--
Thank you!
I'm finding the docs fairly dense and convoluted. Can someone point me to or provide an example of using custom labels to achieve inline code formatting.... like this
<--
Thank you!
Okay I figured it out, it's very easy.
config
block within your StructuredText field:"example_rich_text": {
"type": "StructuredText",
"config": {
"single": "paragraph",
"label": "Rich Content",
"placeholder": "Rich Content",
"labels": ["inline-code"]
}
}
.inline-code
, perhaps something like this .inline-code {
background-color: lightgray;
display: inline-block;
padding: 0 .5ch;
margin: 0 .5ch;
font-family: monospace;
}
That's it!
Thanks for sharing this information James
So, is this possible in Slice Machine? Labels is the old (web editor) standard but when adding them in slice machine as soon as you save the document it deletes the labels property.
It looks like inline code (and the flexibility of labels generally) is no longer supported?
Hey @dan, yes, this is possible since V0.4.2.
Are you getting an error in the console?