refined paragraph enter and split functionalities #239

merged 1 commit into from Jun 13, 2012


None yet

2 participants


No description provided.


Apparently the coffeescript compiler changed a bunch of things about stylistic choices. I made sure I am using the latest coffeescript. Everyone else should do this also.


I think that have fixed the problems that you came across. Also, I added a feature that probably will rarely be used, but it is nice to have. If you make a selection of text and press enter, it splits the selection to be a text area in the middle and puts what is after in a paragraph after that text area. It seems to be a nice way to split things up.

@hallahan hallahan commented on the diff May 31, 2012
- textarea.val('') # Need current text area to be empty. Item then gets deleted.
- # caret needs to be between the old text and the new appended text
- textEditor div.prev(), prevItem, prevTextLen
- return false
- else if e.which == $.ui.keyCode.ENTER
- caret = util.getCaretPosition textarea.get(0)
- return false unless caret
- text = textarea.val()
- prefix = text.substring(0,caret)
- suffix = text.substring(caret)
- textarea.val(prefix)
- textarea.focusout()
- pageElement = div.parent().parent()
- createTextElement(pageElement, div, suffix)
- return false
- .bind 'dblclick', (e) ->
hallahan May 31, 2012 Contributor

I deleted this, because it is no longer used. This bind happens in

@WardCunningham WardCunningham merged commit 1a0f82e into WardCunningham:master Jun 13, 2012

sorry this pull took so long.


no prob.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment