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

Is it possible to add a start and end index? #1

Open
sabithpocker opened this issue Jun 11, 2018 · 4 comments
Open

Is it possible to add a start and end index? #1

sabithpocker opened this issue Jun 11, 2018 · 4 comments

Comments

@sabithpocker
Copy link

[question] [feature-request]

I am working on a search in a table, so if there is "Luminosity" in the table and someone searched for "minos", only that part should be highlighted. Is it possible with lumin?
This can be done if we have a start and end index that can be provided.

@pshihn
Copy link
Owner

pshihn commented Jun 11, 2018

Lumin does not support this at the moment. For you use case, https://markjs.io/ may be a better option

@pshihn
Copy link
Owner

pshihn commented Jun 11, 2018

Leaving this open as a feature request.
Something to keep in mind that lumin works on complex nodes. For example:

<div id="luminRoot">
  These are my fav things:
  <ul>
    <li>Raindrops on roses</li>
    <li>whiskers on 
      <a href="...">kittens</a>
    </li>
  </ul>
  and more...
</div>

What does start and end offset mean in this case?

@szholdiyarov
Copy link

@pshihn probably the most clear meaning would be : start a position of the first character to highlight and end is a position of the last character to highlight in a tree nodes.
So in the example you provided if I pass a prop start=0 and end=30 then the lumin should highlight characters starting from "T" to "r" in raindrops

@sabithpocker
Copy link
Author

@szholdiyarov What do you mean by "raindrops'?

The issue pointed out in the above example is the difficulty in highlighting text across nodes at different levels.

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

3 participants