Added Element relative Highlighter Range.#367
Open
Cavva79 wants to merge 3 commits intotimdown:masterfrom
Open
Added Element relative Highlighter Range.#367Cavva79 wants to merge 3 commits intotimdown:masterfrom
Cavva79 wants to merge 3 commits intotimdown:masterfrom
Conversation
Uses a DOM element as doc. This is more failsafe at HTML structure changes.
NAVER - http://www.naver.com/writer0713@naver.com 님께 보내신 메일 <[rangy] Added Element relative Highlighter Range. (#367)> 이 다음과 같은 이유로 전송 실패했습니다. 받는 사람이 회원님의 메일을 수신차단 하였습니다. |
Serialize has highlights sorting but Deserialize, added it.
getHighlightPositionForElement it is similar to getHighlightForElement but return the index of the highlights array
|
@Cavva79 thanks for your work! I'm going to use your code base. |
Author
|
@ebaranov you are welcome. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uses a DOM element as doc. This is more failsafe at HTML structure
changes.
Now you can specify a DOM object in which you have to highlight. Highlighter start counting just inside this DOM object and not from the beginning of the page. With TextRange and this feature you can safely highlight and store it for different devices even if you have separate menus for those.
We are using this initialization: