Blazor: bind-value-oninput or bind does not work with contenteditable divs
See original GitHub issuebind-value-oninput
or bind
does not work with contenteditable
divs
Bug Description
In the below code, the expectation is as and when I edit the div content I need to update the model so that I can then save it back to Database.
To Reproduce
Steps to reproduce the behavior:
- Using the latest preview version of ASP.NET Core 3
- Run the below code
<div contenteditable="true" bind-value-oninput="@contentEditableText">
You can Edit this Text
</div>
@contentEditableText
@functions { string contentEditableText = "You can Edit this Text"; }
- As I Type something in the editable div, I need to see the same reflected in the body, but it does not happen that way. The OnChange event does not fire automatically.
Expected behavior
OnChange Event needs to fire and changes in editable div should be bound to the model.
Screenshots


Issue Analytics
- State:
- Created 4 years ago
- Reactions:39
- Comments:18 (6 by maintainers)
Top Results From Across the Web
Blazor: bind-value-oninput or bind does not work with ...
bind-value-oninput or bind does not work with contenteditable divs Bug Description In the below code, the expectation is as and when I edit ......
Read more >Blazor: bind-value-oninput or bind does not work with ...
4. As I Type something in the editable div, I need to see the same reflected in the body, but it does not...
Read more >onchange - HTML contenteditable binding support in Blazor
There is a bug open of this here and there is no support of bind with content editable. i try EislerDavid answer using...
Read more >Binding contentEditable div in UI for ASP.NET MVC
I have some divs in my page that have the contentEditable attribute. How can I update the viewmodel when the user changes the...
Read more >contenteditable - HTML: HyperText Markup Language | MDN
The contenteditable global attribute is an enumerated attribute indicating if the element should be editable by the user.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Reopening in case this is something we choose to address in the future.
Based on the number of thumbs up I think a lot of people (including me) are interested in this feature. What should we do to prioritize this work?