Closed wachterjohannes closed 3 years ago
Maybe with some response header the JSON Parser could be activated or disabled, because for example in admin api's you don't want that its replaced and we should avoid context based configuration and services.
@wachterjohannes what if we resolve at current state in a TextEditorResolver?
If these tags are used only in the text_editor
content type, I think providing a TextEditorResolver implements ContentTypeResolverInterface
is a good solution at the moment
@nnatter for headless bundle the texteditor resolver would be enough.
The text editor in sulu can contain various special HTML tags which will be resolved in the traditional system via the response listener
sulu_markup.response_listener
which calls the right parser for the current request format - but in the core there is only a HTML markup parser implemented.We could provide an additional markup parser for JSON which crawls the JSON object and resolves all HTML fields.
See following files in sulu:
Sulu\Bundle\MarkupBundle\Listener\MarkupListener
MarkupListener
Sulu\Bundle\MarkupBundle\Markup\HtmlMarkupParser
HtmlMarkupParser