I’m a little late to the show, but have you considered using inline fields from dataview?
With the following markup:
[chip:: 16:21] Learned something new today...
And this CSS in a snippet:
:not(.cm-active) .inline-field-key[data-dv-key="chip"] {
display: none;
& + .inline-field-value {
background-color: var(--color-blue);
border-radius: 8px;
}
}
You get an output like:
This can of course be style however you like.