-
Notifications
You must be signed in to change notification settings - Fork 0
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
Inline annotations and on word-boundaries #27
Comments
@korsvanloon I assigned you as you are the main webplugin author, however I can help if you'd like. I've worked with HTML Ranges and selections before... |
I think this had to do with some server side error exchanging the text with the text_content and so created a button for the whole paragraph instead of just the phrase. This has long been fixed so I'm closing this issue. |
No, it had nothing to do with that. |
It was related to the fact that your annotation-underline div/button was block instead of inline. Furthermore I asked you to snap the users selection to word boundaries. When I select a text in the document, we would want to snap this to word boundaries, because otherwise we are breaking up the text by inserting HTML in between. Consider this:
Now 3 bla's would appear on the first line, and the 3x bla + 1 would appear on the next line, where previously the 4x bla would be kept together. |
It's important that we modify the annotation/explanation requests texts to be on word-boundaries. If not, we insert a button or other HTML that will break the flow of that word, allowing it to wrap across multiple lines. This can be prevented by extending the selection to the nearest space/punctuation.
Furthermore we need to make sure that we insert inline/inline-block elements only, otherwise we mess up the flow of the article as can be seen below:
This is an annotation request that came from the API btw 👍
The text was updated successfully, but these errors were encountered: