Code Monkey home page Code Monkey logo

Comments (6)

iweijie avatar iweijie commented on June 6, 2024

现在不支持, 需要改写下事件的触发方式 ,这块之前想做, 后续没有需求就停滞了 ...

from react-web-highlight.

leejunhui avatar leejunhui commented on June 6, 2024

如果能支持移动端就太完美了😄

from react-web-highlight.

leejunhui avatar leejunhui commented on June 6, 2024

现在不支持, 需要改写下事件的触发方式 ,这块之前想做, 后续没有需求就停滞了 ...

最近项目中遇到了在 h5 页面中划线标注和笔记的需求,想请教一下如果要让 react-web-highlight 支持移动端的话改造成本高吗?以及如果要支持移动端的话的一个改造思路是怎么样的呢?十分感谢~

from react-web-highlight.

iweijie avatar iweijie commented on June 6, 2024

image

@leejunhui 现有的事件是在pc端 mouseup 去判断是否有选中的文本, 移动端这边事件的触发可能会有所不同

from react-web-highlight.

leejunhui avatar leejunhui commented on June 6, 2024

image

@leejunhui 现有的事件是在pc端 mouseup 去判断是否有选中的文本, 移动端这边事件的触发可能会有所不同

感谢回复~ 这个库支持移动端的长按手势 https://github.com/luojilab/easy-marker,但是它的高亮和划线不是在原本的文字的 DOM 结构上,而是一个 svg 盖在了文字的上面,这样就会造成调整文字大小之后,高亮和划线位置错误。我再尝试看看能不能结合 easy-marker 和 react-web-highlight 实现一下

from react-web-highlight.

leejunhui avatar leejunhui commented on June 6, 2024

@iweijie 在借鉴了您的 react-web-highlight 的核心代码后,结合 easy-marker 的长按手势识别,最终达到了理想的效果👍🏻

from react-web-highlight.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.