Hello!
So for your specific use case I think you could do
fdplotly(json(p); style="display:flex; flex-wrap:wrap;")
but granted you might want to do something specific with the string, if you look at the code it should be pretty simple to build your own: this is the string I use in fdplotly:
~~~
<div id="$id" style="$style"></div>
<script>
var fig = $json;
CONTAINER = document.getElementById('$id');
Plotly.newPlot(CONTAINER, fig.data, fig.layout)
</script>
~~~
you can modify this as you’d like
you could also create your own function with your own specs