Per a customer request, the editor should support the ability to wrap multiple block elements with a single block element. Below outlines the expected functionality for this feature.
Initial scoping by Guerric
In the following examples, [sel:X] indicates where the user selection beings & ends. [cursor] indicates where the editor cursor is located.
Wrapping styles should be added to the CKEditor style dropdown in a similar manner to the other styles.
The single paragraph should be wrapped.
[sel:start] <p>Hello</p> [sel:end,cursor]
<div class="wrap"> <p>Hello</p> </div>
The highlighted block elements should be wrapped with the selected wrap style.
[sel:start] <p>Hello</p> <p>World[sel:end,cursor]</p>
<div class="wrap"> <p>Hello</p> <p>World</p> </div>
The wrapping blocks should be nested.
<div class="wrap"> [sel:start] <p>Hello</p> </div> <p>World</p> [sel:end,cursor]
<div class="outer-wrap"> <div class="inner-wrap"> <p>Hello</p> </div> <p>World</p> </div>
User selects the section that has the wrap applied and selects "Normal" which should remove all the wrapping styles within their selection.
<div class="wrap"> <p>Hello[cursor]</p> </div>
<p>Hello</p>
<div class="wrap"> <p>That's a wrap</p> <div class="wrap"> <p>Hello[cursor]</p> </div> </div>
<div class="wrap"> <p>That's a wrap</p> <p>Hello[cursor]</p> </div>
<div class="wrap"> <p>That's a wrap[cursor]</p> <div class="wrap"> <p>Hello</p> </div> </div>
<p>That's a wrap</p> <div class="wrap"> <p>Hello[cursor]</p> </div>
When the user moves their cursor to a section that has a wrapping style, that style should show up in the style dropdown. Even though there are multiple block styles at the cursor location, the innermost wrapping style should be displayed.
<div class="wrap"> <p>Hello[cursor]</p> </div>
<div class="outer-wrap"> <div class="inner-wrap"> <p>Hello[cursor]</p> </div> <p>World</p> </div>
<div class="outer-wrap"> <div class="inner-wrap"> <p>Hello</p> </div> <p>World[cursor]</p>
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by