In frontend/src/widgets/RichTextWidget.astro we can find:
---
const { widget } = Astro.props;
const { content } = widget;
---
<!-- We know Astro so no needless div here -->
<Fragment set:html={ content }></Fragment>
But what if I want to have a div or section here?
When I change the output to:
<section class="rich-text-widget">
<div class="wrapper" set:html={content} />
</section>
everything works fine in preview.
Unfortunately, in edit mode the wrapping markup gets totally lost and cannot serve its purpose anymore. If I want to rely on it in styling there is no parity between preview and edit layout.
Is this intentional? Can be avoided?
Or maybe the only solution would be to build a custom widget like "TextContentWidget" which embeds AposArea with a single RichTextWidget available?