Custom preview - Layout markdown text

Hello,

I’m trying to make a custom preview. Is there any way to layout markdown text in the preview ?

/site/plugins/custom-block/index.js in wich {{ content.contenu }} is a text written in markdown :

panel.plugin("lineaire/element-block", {
    blocks: {
      element: `
        <div class="element__content" @click='open'>
          {{ content.contenu }}
        </div>
      `
    }
  });

You would need a custom api endpoint that returns the rendered markdown, I think.