0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

Markup links on 'enter' too.

* Check for links in the current text node, and add <a> tags if found, when the
  enter key is pressed, not just when the spacebar is pressed.
This commit is contained in:
Neil Jenkins 2013-01-24 11:51:51 +11:00
parent f49d1c190e
commit 45711a38a4

View file

@ -1383,8 +1383,9 @@
var range = getSelection();
if ( !range ) { return; }
// Save undo checkpoint
// Save undo checkpoint and add any links in the preceding section.
recordUndoState( range );
addLinks( range.startContainer );
getRangeAndRemoveBookmark( range );
// Selected text is overwritten, therefore delete the contents