Opened 18 years ago
Closed 17 years ago
#265 closed New Feature (fixed)
Add attribute to fckstyles.xml to indicate that a style should "not" be wrapped
Reported by: | Ray T | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.5 Beta |
Component: | Core : Styles | Version: | FCKeditor 2.4 |
Keywords: | Cc: |
Description
This is from the "styles configuration" page of the wiki => "We can also combine many styles over the same selection."
Wouldn't it be useful to have an extra attribute of the <Style> XML tag in the fckstyles.xml (or your custom fckstyles.xml) that would control whether that style would allow nesting or whether it would "replace" any other style applied to the line (like the fontformat does). eg, <Style name="Title H3" element="h3" replace="true" />
Thankfully since our organisation site does not use classes or other tag attributes much, I actually ended up using the fontformat list entirely in lieu of the styles, even though it's more basic. I found the nesting of the styles a problem rather than useful feature for our site; and although I discovered you can un-apply styles by reselecting them, I'm not sure that is very intuitive.
Change History (3)
comment:1 Changed 18 years ago by
Keywords: | Discussion added; styles fckstyles.xml nest wrap surround removed |
---|---|
Milestone: | → FCKeditor 2.5 |
comment:2 Changed 18 years ago by
The rules for block elements you describe for 2.5 will definitely take care of the problem that initiated my suggestion. As in the problem that I could see was eg ending up with <h1><p>Some Text
With that in mind I am undecided on providing conditional replacement for inline elements. As you suggest fredck, maybe it would confuse the user. I think your last suggestion of a setting to replace all or combine all has merit but would need to be explored a bit more.
Anyone else have thoughts on this? I did not find much that seemed related on the forums, so thought I may be alone in thinking that the provision of combining elements can be a problem in some cases rather than a help.
comment:3 Changed 17 years ago by
Keywords: | Discussion removed |
---|---|
Resolution: | → fixed |
Status: | new → closed |
[774] introduced the news style system, which makes the correct handling of block elements as described in the comments here. It also introduces a way to define "override" rules to styles, which extends this "no wrap" idea to inline elements (see Components/Styles?).
There is still #1245 to be done to make it usable at the XML file, but the feature is already there.
The new style system, to be developed for the 2.5, will have some intrinsic rules in this sense. For example, there will not be possible to combine block elements, so if you apply a <h3>, it will be replace when switching to a <h1>, for example.
The idea of having the replacement attribute cold be nice for inline attributes instead. So, when applying a <span>, we could configure it to remove any other formatting tags (<span>, <b> and so on) from the selection. I'm just not sure that it will be intuitive to the user, having some styles that get combined and others that replace everything.
Maybe it is a better solution to have a setting saying that all defined styles should replace or combine? Suggestions?