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

Lines in documents can have multiple word elements #4

Closed
Raffinate opened this issue Feb 3, 2021 · 2 comments
Closed

Lines in documents can have multiple word elements #4

Raffinate opened this issue Feb 3, 2021 · 2 comments

Comments

@Raffinate
Copy link

Raffinate commented Feb 3, 2021

If text in the line has multiple fonts or various formatting, the line is split in multiple word elements.

In that case GoogleDocsUtils.getWordElements() will find only first word node in the line and other word nodes won't be found.

This breaks all functions that are related to word nodes, such as getCaret() e.t.c.

Steps to reproduce:

  1. Create text document in google docs
  2. Write several lines of text
  3. Format middle word in any line with different font
  4. Place caret in that word
  5. Execute GoogleDocsUtils.getCaret()

Expected properly initialized caret, but instead we have all fields as null

@Raffinate
Copy link
Author

Created pull request with fix

@Amaimersion
Copy link
Owner

Solved in 2.2.0 version.

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

2 participants