Opened 17 years ago
Closed 15 years ago
#536 closed New Feature (fixed)
Style Selection checking of parent elements
Reported by: | Trevor Phillips | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.3 |
Component: | Core : Styles | Version: | |
Keywords: | Confirmed Review+ | Cc: | Damian |
Description
The Styles Configuration functionality almost does what I require. What I'd like to be able to do is define several styles, using classes, to be assigned to tables, table rows, and table cells. I can get it working, but only with tables, and only in IE.
Why not walk up the DOM when checking the Styles context sensitivity, and allow the application of styles to parent elements (just the first tag-matching parent)?
In this way, simply putting my cursor anywhere within a td would allow me to change the style of that parent td, the parent row, the parent table, etc...
I've seen this functionality in similar WYSIWYG HTML editors, and it'd be great in FCKEditor.
Attachments (1)
Change History (10)
comment:1 Changed 17 years ago by
Component: | General → Core : Styles |
---|
comment:2 Changed 16 years ago by
comment:3 Changed 16 years ago by
Keywords: | Confirmed added |
---|
comment:4 Changed 15 years ago by
Cc: | Damian added |
---|---|
Milestone: | → CKEditor 3.3 |
comment:5 Changed 15 years ago by
I'm not sure if I understand the problem here, but such kind of Object Style applying is already available in Firefox, e.g. by selecting element from elements path bar and apply the style.
The real problem here is unable to have the same behavior on IE and Webkit, because in those browsers' selection system you're not able to *select* the entire element (comparing to select element content), e.g. table cell.
comment:6 Changed 15 years ago by
Owner: | set to Garry Yao |
---|---|
Status: | new → assigned |
Ok, now I understand this feature request better after checking styles system of Office Word 2007, in our case, 'stylesCombo' should be able to apply styles (like table and list) on a stack of elements in path, with the cursor simply anchors inside text content, without the assistance of any other plugins like 'elementsPath'.
Changed 15 years ago by
comment:7 Changed 15 years ago by
Keywords: | Review? added |
---|
The patch provides the capability to apply 'object' type style on appropriate element on path, including the 'selected' element we currently support now.
Two additional style definitions (table and list) are added to exemplify the usage, note that remove applied object style is not implemented yet and is out of the ticket scope.
comment:8 Changed 15 years ago by
Keywords: | Review+ added; Review? removed |
---|
Seems to work fine, just some comments:
Please, file a bug to remove applied object styles.
What about adding also an example with links?
{ name : 'External link', element : 'a', attributes : { 'target' : '_blank', 'class' : 'external' } }
th is missing in the current definition of objectElements
var objectElements = { a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,ul:1 };
it would be better if you could fix it also with this checkin. You are gonna save a lots of headaches with this patch.
comment:9 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
#2146 has been marked as dup