#2797: Styles cannot be applied when a whole paragraph is selected
---------------------------------------+------------------------------------
Reporter: martinkou | Owner: martinkou
Type: Bug | Status: assigned
Priority: High | Milestone: CKEditor 3.0
Component: General | Version: SVN
Keywords: Confirmed Firefox Review? |
---------------------------------------+------------------------------------
Comment(by martinkou):
The problem was found to be caused by line 226 in the style plugin.
Whenever the user triple clicks to the right of a paragraph, the selection
range becomes like this:
{{{
<p>^This is some <b>sample text</b>. You ...^</p>
}}}
Line 226 in the style plugin expands the selection range to include the
outermost element. Thus, after line 226, the range becomes like this:
{{{
^<p>This is some <b>sample text</b>. You ...</p>^
}}}
The logic after line 226 assumes everything in the range is inline stuff,
but turns out we've got a block in the range. So the range is ignored.
My patch adds a mode to CKEDITOR.dom.range::enlarge() called
CKEDITOR.ENLARGE_INLINE_ELEMENTS. It does the same thing as
CKEDITOR.ENLARGE_ELEMENT, but stops when a non-inline element is met.
--
Ticket URL: <http://dev.fckeditor.net/ticket/2797#comment:7>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac