elkarte/Elkarte — pull request #1177 by Spuds (2013-12-20 22:05:24+00:00)
Title: Split tag

This was discussed on the site some time back. This allows you to press ctrl+enter inside a line of text and have it split in two with new close/open clones of the bbc tags you were in.

OK thats a crappy description, but its really intended for when you quote a message and want to break it up in to smaller quote chunks. so ```[quote]some |text[/quote]``` is in the editor where that | is the caret, press control enter and you will get ```[quote]some [/quote][quote]|text[/quote]```

Not sure control was the best key to use, could add shift but for some reason the editor event was not sending that, but that was early on in the work, so perhaps something else was wrong at that point. Mouse events are also not sent so click+enter is out as well.

Also this only works in source mode, I tried a few things in wysiwyg mode and there are some complications that I did not want to deal with. Unfortunatly doing a "toggle" does not work either as the cursor position is lost, so you don't know where to split things once you go in to text mode. In wiz mode it wanted to create nested quotes and not new ones, so I said, umm source editor is good enough :innocent: