Replies: 1 comment
-
|
you need to add other components, textnode > content should not contain HTML. "components": [
{ "type": "textnode", "content": "New Part"},
{ "tagName": "br" },
{ "type": "textnode", "content": "Test"},
] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone.
I have a JSON exported from the GrapeJS editor.
I need to modify some parts of my JSON content and insert them into a new editor for final editing.
The problem is that this new content I need to insert into the exported JSON contains some line breaks (new lines) with "\r\n".
I just want to build the new editor with the content and parse the code of the new lines.
But I don't know how to do this. I've already tried adding HTML tags like
.
I've already escaped the \r\n and it became \\r\\n, but when building the new editor with the modified JSON, the line doesn't break.
Example:
The
{TEST}will be replaced, for example, with 'New part \r\n of test'.The when the editor is mounted with this modified JSON, the editor dont break the line (not create new line).
Can anyone help me?
Beta Was this translation helpful? Give feedback.
All reactions