Thank you for this amazing library! ❤️
Is there a way to add a <raw-text-block> block such that content inside the this block stay as plain text and can be edited as plain text thru out the editor life cycle. I think this would be an easy escape hatch while we work on supporting unsupported syntax. For example, when user copy paste in a nested list, or a table, the editor value would be the following:
<html>
<p>some other content</p>
<raw-text-block>
- list 1
- sub list 1
- sub list 2
- list 2
</raw-text-block>
<raw-text-block>
header 1 | header 2
--- | ---
a | b
c | d
</raw-text-block>
</html>
and the rendered result can stay as plain text, like this (except the raw-text-block shouldn't use codeblock styling)
Something similar to allowing users to insert a plain <textarea /> block in the editor HTML code.
Is your feature request related to a problem? Please describe.
Partially. I'm looking into a way to allow users to type in unsupported syntax. Main blocking syntax are:
- nested lists
- code block with language
- table
Describe the solution you'd like
Give caller a way to insert raw-text-block, similar to codeblocks. Maybe something like this:
- caller calls
toggleRawTextBlock() (via a button, or when we detect unsupported syntax when we call setValue(), ex, during copy pasting, or editing message)
- inserts
<raw-text-block>some content</raw-text-block> in the editor value
- allows users to edit the raw text block content
- the underlying HTML stay as
<raw-text-block>some content</raw-text-block> thru out the edit
Describe alternatives you've considered
- Use codeblock. Assign codeblock language as text so that the content stay unchanged. But i can't find a way to assign code block language
- Allow users to add plain textarea tags. Either in my app, or in the library fork
Additional context
I use https://github.com/software-mansion/enriched-markdown to render the sent messages as markdown. I'm transitioning my app from a raw TextInput into this library. There are many existing messages that are sent from plain TextInput are now not-editable using the enriched-html input 😢 .
Thank you for this amazing library! ❤️
Is there a way to add a
<raw-text-block>block such that content inside the this block stay as plain text and can be edited as plain text thru out the editor life cycle. I think this would be an easy escape hatch while we work on supporting unsupported syntax. For example, when user copy paste in a nested list, or a table, the editor value would be the following:and the rendered result can stay as plain text, like this (except the raw-text-block shouldn't use codeblock styling)
Something similar to allowing users to insert a plain
<textarea />block in the editor HTML code.Is your feature request related to a problem? Please describe.
Partially. I'm looking into a way to allow users to type in unsupported syntax. Main blocking syntax are:
Describe the solution you'd like
Give caller a way to insert raw-text-block, similar to codeblocks. Maybe something like this:
toggleRawTextBlock()(via a button, or when we detect unsupported syntax when we callsetValue(), ex, during copy pasting, or editing message)<raw-text-block>some content</raw-text-block>in the editor value<raw-text-block>some content</raw-text-block>thru out the editDescribe alternatives you've considered
Additional context
I use https://github.com/software-mansion/enriched-markdown to render the sent messages as markdown. I'm transitioning my app from a raw TextInput into this library. There are many existing messages that are sent from plain TextInput are now not-editable using the enriched-html input 😢 .