【问题标题】:wysihtml5 cursor jumps to wrong place on new linewysihtml5 光标跳到新行的错误位置
【发布时间】:2015-01-03 03:43:14
【问题描述】:

当点击“return”或“enter”时,光标不会跟随实际行。有解决问题的方法吗?该插件有几个分支可以解决这个问题,但我很好奇解决它的实际解决方案是什么。

这是一个基于项目的jQuery插件:https://github.com/jhollingworth/bootstrap-wysihtml5/,你可以看到错误:http://jhollingworth.github.io/bootstrap-wysihtml5/(按回车几次)

【问题讨论】:

  • 这是什么浏览器?
  • @astro Chrome 39.0.2171.71

标签: javascript jquery jquery-plugins wysihtml5 bootstrap-wysihtml5


【解决方案1】:

这个问题已经在on the project's GitHub page讨论过。

修复是mentioned in the above thread:

// "commenting these lines (5869 and 5870) in wysihtml5-0.3.0.js fixes it:
// composer.commands.exec("insertLineBreak");
// event.preventDefault();"
// 
// Example:

if (keyCode === wysihtml5.ENTER_KEY && !wysihtml5.browser.insertsLineBreaksOnReturn())  {
    //composer.commands.exec("insertLineBreak");
    //event.preventDefault();
}

【讨论】:

    猜你喜欢
    • 2016-08-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-21
    • 1970-01-01
    相关资源
    最近更新 更多