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

Inline annotations and on word-boundaries #27

Open
hermanbanken opened this issue Mar 25, 2015 · 4 comments
Open

Inline annotations and on word-boundaries #27

hermanbanken opened this issue Mar 25, 2015 · 4 comments
Assignees

Comments

@hermanbanken
Copy link
Collaborator

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:

screen shot 2015-03-25 at 10 06 31

This is an annotation request that came from the API btw 👍

@hermanbanken
Copy link
Collaborator Author

@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...

@hermanbanken hermanbanken changed the title Inline annotations and on full words Inline annotations and on word-boundaries Mar 25, 2015
@korsvanloon
Copy link
Collaborator

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.

@hermanbanken
Copy link
Collaborator Author

No, it had nothing to do with that.

@hermanbanken hermanbanken reopened this Apr 6, 2015
@hermanbanken
Copy link
Collaborator Author

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:

bla bla blablablabla bla

bla bla bla<button>blablabla bla</button>

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.

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

No branches or pull requests

2 participants