-
Notifications
You must be signed in to change notification settings - Fork 81
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
Can I bind to dynamically generated DOM elements? #7
Comments
Right now this is not possible without altering the code, but I think it would be a good feature. The ability to scope grande.js to only a subset of the DOM seems necessary if it needs to be easily embedded into existing systems. |
@vicary Thanks! This really has to be done for it to be embedded on other webpages, I have a few questions about this though:
|
For whatever approach of your choice, disposal (manual or automatic) and memory leaks could be overlooked easily, esp. when porting scripts from static to dynamic. |
|
Fixed via 9a1b5c4. |
@mduvall so with the I guess my situation also presumes using the editor on more than just article elements. |
What about this to check editable nodes?
or pop it into a separate function like so and then check if true in triggerTextSelection to either show the editor tooltip or not...
|
Yeah that sounds good to me, would eventually like to move away from the document-level event bindings as well! 👍 |
Thanks for the work, this is beautiful.
I am looking for a light-weight text editor like this to apply in a CMS.
Instead of
grande.bind()
orgrande.init()
to the whole document, can I apply this to part of the DOM just when the editable area is generated?The text was updated successfully, but these errors were encountered: