6

When 'return' or 'enter' is hit, the cursor does not follow the actual line. Is there a solution to the problem? There are a few forks to the plugin which fixes the issue, but I am curious what the actual solution was to fix it.

This is a jQuery plugin based on the project: https://github.com/jhollingworth/bootstrap-wysihtml5/ and you can see the error: http://jhollingworth.github.io/bootstrap-wysihtml5/ (hit enter a few times)

Chandrew
  • 16,987
  • 4
  • 24
  • 40

1 Answers1

2

This issue has been discussed on the project's GitHub page.

The fix is 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();
}
alex
  • 6,818
  • 9
  • 52
  • 103