Closed ionlizarazu closed 2 years ago
Volto configuration:
Converter:
requests.post("http://localhost:5000/html", json={"html": html}, headers={"Accept": "application/json"})
HTML content:
<p><a href="https://plone.org" target="_blank" rel="noopener noreferrer">Converted link.</a></p>
I get the following JSON result and volto-slate does not render any link:
"43c7fb68-d334-40ab-99f3-e5dc5c569c23": { "@type": "slate", "plaintext": "Converted link.", "value": [{ "children": [{ "children": [{ "text": "Converted link." }], "data": { "target": "_blank", "title": null, "url": "https://plone.org" }, "type": "link" }], "type": "p" }] }
If I add a new external link with volto-slate editor, the generated JSON is this:
"d67f2b93-8e9f-4760-b08e-35579e4a0802": { "@type": "slate", "value": [{ "type": "p", "children": [{ "text": "" }, { "type": "a", "data": { "link": { "external": { "external_link": "https://plone.org", "target": "_blank" } } }, "children": [{ "text": "Manually added." }] }, { "text": "" }] }], "plaintext": " Manually added. " }
As you can see, what my volto-slate expects as a link is quite different. Have I a wrong volto-slate configuration or am I doing a incorrect request?
I've tested with "volto-slate:minimalDefault,simpleLink,tableButton" configuration after @sneridagh suggestion and it works. Rendering and editing part are OK.
This should be reflected in the README
Volto configuration:
Converter:
HTML content:
I get the following JSON result and volto-slate does not render any link:
If I add a new external link with volto-slate editor, the generated JSON is this:
As you can see, what my volto-slate expects as a link is quite different. Have I a wrong volto-slate configuration or am I doing a incorrect request?