You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the information screen multiple new lines for a text block are shown as tags in the item preview. This is stripped when rendered in Interviewer (preview), and also parses correctly into a new line in the rich text editor. Seems like something the rich text serializer is doing.
Update the preview (in the list in architect) to match the render settings in Interviewer
Update the serializer to remove this behaviour?
The text was updated successfully, but these errors were encountered:
react-markdown escapes html intentionally for security reasons. remark-slate serializes multiple line breaks into tags.
Options are:
Add html support to react-markdown (security implication with malicious protocols)
Strip <br> tags from the serialized output (will cause mismatch between <RichText> preview and actual markdown output)
Replace <br> tags in output with something that react-markdown supports. It's not clear if there is something suitable; double spaces only work when used in conjunction with copy.
Update the slate instance to prevent multiple line breaks (may seem like broken behaviour to user)
I don't think we should be generating <br /> tags from slate, so my first preference is to prevent that. Maybe we could replace them with empty paragraphs that contain a single (escaped) space. This would require updating the empty node detection.
Failing that, I think stripping them and accepting the mismatch between the editor and the output is the thing to do.
On the information screen multiple new lines for a text block are shown as
tags in the item preview. This is stripped when rendered in Interviewer (preview), and also parses correctly into a new line in the rich text editor. Seems like something the rich text serializer is doing.
The text was updated successfully, but these errors were encountered: