Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle textContent? #4

Open
LeaVerou opened this issue Dec 7, 2021 · 0 comments
Open

How to handle textContent? #4

LeaVerou opened this issue Dec 7, 2021 · 0 comments

Comments

@LeaVerou
Copy link
Owner

LeaVerou commented Dec 7, 2021

Right now, textContent doesn't do anything special, and one needs to use mdContent to re-render Markdown on the component.
However, that means that <md-block> doesn't work well with libraries that handle HTML in an agnostic way (e.g. Mavo, Vue, Angular etc).
However, if textContent (and innerText?) becomes an alias to mdContent, then how does one get the actual textContent of the element?

Another alternative would be if textContent sets mdContent on write, but returns the actual element textContent on read. This would allow libraries that work with textContent to update its content, but reading textContent would still work.
Is there any precedent for such behavior? Is it confusing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant