-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[draft] Provide a JsonCompatible adapter for RichTextValue objects #1584
base: main
Are you sure you want to change the base?
Conversation
@erral thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment:
To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
✅ Deploy Preview for plone-restapi canceled.
|
✅ Deploy Preview for plone-restapi canceled.
|
127d596
to
29d679a
Compare
Your solution provides only the rendered safe-HTML. But what if we want to get the raw data from the field, for an editor or alike? This could be any content type as raw, i.e. markdown. I do not think this implementation is enough. I would expect something like a dict with output, raw and its configured types, i.e something like: {
"output": {
"data": "<p>foo<p>",
"type": "text/safe-html",
"raw": {
"data": "foo",
"data": "text/plain",
} |
This is the initial draft. I first checked what happens when you add a simple HTML as a default value of the RichText field. I will test further with some other values. |
OK! Since this is not a draft PR nor labels were applied, my understanding was like it is ready for review. |
Fixes #1583