#CONTENTEDITABLE GET PLAIN TEXT CODE#
The program ' iisexpress.exe' has exited with code -1 (0xffffffff). The thread 0x19f50 has exited with code 0 (0x0). The thread 0x148b0 has exited with code 0 (0x0). The thread 0x13158 has exited with code 0 (0x0).
![contenteditable get plain text contenteditable get plain text](https://i.stack.imgur.com/585hS.png)
(TypeError: Cannot read property ownerDocument' of null) System.AggregateException: One or more errors occurred. Circuits.CircuitHost: Error: Unhandled exception in circuit 'QG3dCgY6YbpBtMOfMZD-RFf8NkIGGr5rU_LW0_mWXRw'. Circuits.RemoteRenderer: Warning: Unhandled exception rendering component: TypeError: Cannot read property 'ownerDocument' of null The thread 0x19a08 has exited with code 0 (0x0). The thread 0x14d30 has exited with code 0 (0x0). > System.InvalidOperationException: TypeError: Cannot read property 'ownerDocument' of null (TypeError: Cannot read property 'ownerDocument' of null) Circuits.CircuitHost: Error: Unhandled exception in circuit 'Swbo9SZWGvWPlPskMIny6in-bSXy_1d1IWmLChbf9KY'. System.InvalidOperationException: TypeError: Cannot read property 'ownerDocument' of null Here is a simple example to reproduce this issue: The thread 0x14ff8 has exited with code 0 (0x0).
![contenteditable get plain text contenteditable get plain text](https://media.architecturaldigest.com/photos/567b06fc7fd9a58978b7cc80/master/pass/guest-bedroom-04.jpg)
This only occurs when I use a custom Tag like System.InvalidOperationException: TypeError: Cannot read property 'ownerDocument' of nullĪt .Renderer.InvokeRenderCompletedCallsAfterUpdateDisplayTask(Task updateDisplayTask, Int32 updatedComponents) I know that value-binding is not supported right now for editable divs so I want to use the onblur-event to read and parse the text.īut when I change the content and leave the div I get an InvalidOperationException. I want to use a editable div in Blazor to mix plain text and some html-elements like. Here is a small test playground I was using a few days ago to debug issues with. If you're interested in thinking this through I may be able to help, I've walked into all traps around dealing editable divs multiple times already ?. Maybe it shouldn't be named after the (partly broken) innerText and should be named bind:text= for example. Setting the innerText works like a charm, but the other way around, getting innerText, often results in too many return characters. What comes closest is innerText, but this has serious issues too. But when I change the content and leave the div I get an InvalidOperationException. I know that value-binding is not supported right now for editable divs so I want to use the onblur-event to read and parse the text. It could be a killer feature if Svelte can tackle these complexities once and for all, though it's not trivial. Unfortunately there is no simple way to keep multiline plain text in sync with the contents of an contenteditable div. I want to use a editable div in Blazor to mix plain text and some html-elements like. As far as I know there does not exist a solution to keep multiline plain text in sync with the contents of an editable div, which is probably the main reason to use innerText in the first place. I hope this new feature bind:innerText will magically solve the issues I've always struggled with using editable divs, but I may be too optimistic ?.
![contenteditable get plain text contenteditable get plain text](https://blog.jse.li/schoology/groups.png)
Besides that it's tricky to keep the cursor in place whilst typing and getting/setting innerText concurrently. In the JSONEditor, I had to write a custom getInnerText which traverses the HTML contents of the div. Unfortunately there is no simple way to keep multiline plain text in sync with the contents of an contenteditable div. For that reason, I'm using contenteditable divs and not a textarea for example. In this editor, I need input fields which automatically fit their contents. Just to explain a bit about my use case: I'm currently working on a proof-of-concept of svelte-jsoneditor written in Svelte (my way to learn Svelte).