V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
kgdb00

v2ex“创作新主题”的“正文”输入区域光标不闪烁,这是怎么做到的?

  •  
  •   kgdb00 · Jan 15, 2022 · 1838 views
    This topic created in 1573 days ago, the information mentioned may be changed or developed.
    我非常反感光标闪烁,windows 和 linux 都可以在系统 /桌面环境级别关闭光标闪烁,chromeos 好像不行,这导致我用 chromebook 在浏览器内写大段文本时非常不舒服,我就想用和 V2EX 同样的方式写一个 html 页面用来输入大段文本。
    3 replies    2022-01-15 10:34:41 +08:00
    Livid
        1
    Livid  
    MOD
    PRO
       Jan 15, 2022
    我们应该没有做什么太特别的事情。

    https://www.sunp.eu.org/write 上正文输入部分用的是 CodeMirror
    noe132
        2
    noe132  
       Jan 15, 2022 via Android   ❤️ 1
    codemirror 的光标是一个 html 元素而不是原生光标。自己加 css 还可以给光标换颜色等等
    otakustay
        3
    otakustay  
       Jan 15, 2022   ❤️ 1
    我记得 vscode 的光标也是个 html 元素,闪烁效果还曾经是 vscode 性能的一个大祸害
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   975 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 19:13 · PVG 03:13 · LAX 12:13 · JFK 15:13
    ♥ Do have faith in what you're doing.