The only way to quote something, and then continue outside of the quote is to have an element already waiting below where the blockquote is going to be. There's a few fixes that I can think of:
1. Create an element below the blockquote whenever a blockquote (or probably any container that nests,I've only encountered blockqoute so far) is created. The problem with this is that the user has to break flow by clicking/arrowing into the extra element before they begin typing again.
2. Another solution would be to have the default behavior for <ENTER> when inside of a nested container jump outside of the parent container and create the next element there rather than inside of the parent.
One issue that I see immeadiately with #2 is that if you DO want to type out multiple paragraphs inside of a blockquote...you'd be screwed.
This seems like a pretty sticky situation. I think #1 is probably the only way to go, make it so that the default behavior of inserting a blockquote (or other nested container) is to create an empty p below it IF one doesn't already exist. Has anyone else had this problem or have any ideas?
Thanks for your help!
EDIT: Here's a quick hack that I did to implement solution #1. I don't really know javascript or WYM so it's definitely the wrong way to do it, but it works for testing.
- Code: Select all
//if there is no nextSibling for blockquote, add a p
if( newNode.nextSibling.nodeName == "#text" ){
pNode = this._doc.createElement("p");
newNode.parentNode.insertBefore(pNode,newNode.nextSibling);
}
on line ~1005 of trunk, directly after:
- Code: Select all
container.parentNode.insertBefore(newNode,container);
newNode.appendChild(container);