-
Notifications
You must be signed in to change notification settings - Fork 4
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
Annotations on dynamic content and controlling what can/can't be annotated #6
Comments
Hey, thanks for using our software. Always great to see! Both things are currently not officially supported, although we did think about them.
Hope this helps at least a bit. cc @markijbema @EamonNerbonne @martijnrusschen |
Yeah this helps a lot! Thank you! I'll be giving it a shot tomorrow when I get into the office. I'll let you know the result. Thanks again! |
If you're bugged by the console errors, these can be disabled in highlight.coffee:111 by making the else a little more specific (or simply removing the warning altogether). Perhaps the best solution would be to allow checking for the existance of a particular factId. The data structure to do that already exists; it's just not part of the public api: that's highlightsByFactIds, which stores highlights in a hash by their id. |
@janpaul123 Calling Any other ideas? |
I'm no CoffeeScript developer, but I took a crack at hacking together a function to call. I noticed that in paragraph_buttons.coffee there is a callback attached to the I basically turned that into a function hanging off of
Do you guys see a problem with this at all? It doesn't seem to be causing any errors or anything on the site. |
Unfortunately, we've got lots of side-effectful constructors, so it's a little hard to follow, but I think there is a problem with that; namely that addParagraphButtons adds buttons regardless of whether they've been added before, i.e. that adds duplicate buttons to paragraphs already. I haven't tried this, but that strikes me as not immediately problematic, but certainly not the way we'd want to keep things. In other words, you'd need to alter So either:
|
Hello! Factlink will most likely save me a ton of time writing my own annotation system, so what you guys have created is much appreciated. So before I start in with the issues, I'd like to say thank you :)
First, I'd like to be able to annotate content that is loaded via AJAX. Right now that isn't possible. Is there some method I can call to have it re-parse the DOM and populate the annotation buttons again after content is loaded? This seems like a pretty simple thing to do, but I could totally be wrong. I looked through the code on GitHub and couldn't really find a clue to help with this.
Second, is there a way to control what is allowed be annotated and what isn't? IE: Article content paragraphs only, using some sort of class added to the elements that can't be annotated. Or perhaps by passing a selector to Factlink to tell it what IS annotatable.
Thanks in advance!
The text was updated successfully, but these errors were encountered: