Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#494 closed Task (fixed)

Implement the new "Style System"

Reported by: Frederico Caldeira Knabben Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: Core : Styles Version:
Keywords: Cc:

Description

Implement the new "Style System", which include a revision of the Style combo and the system which handles the styles in the editor.

More info about it can be found here?.

Change History (6)

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

Status: newassigned

comment:2 Changed 17 years ago by Alfonso Martínez de Lizarrondo

For sure it looks very powerful and when it works it will be great!

Anyway I think that the Variable Attributes and Styles could be a little too complex for the initial version as it will need to popup a dinamically generated form to the user to query those values. I think that once the work to make sure that everything is working fine it will be a great addition, but with the complexity required to make a style system work all the time, having this feature developed at the same time can take away testing time from the core features.

And couldn't the Remove Format command also be replaced now?

When parsing a css file: if a rule such
td span.red { ... }
is found, will the style system make sure that the span.red can be created only inside a td?
I don't think so, but someone will ask

Also, are Id's parsed from the CSS file? Doesn't seem so.
As a related question:
if a style is based only in an ID:

<Style label="My Main Header" element="h1">
	<Attribute name="id" value="MainHeader" />
</Style>

Will it be possible to create two of those Main headers in the document (that would be wrong as Id's should be unique)

Ok, that's all for now. I can guess the replies to some questions but I think it's better to have everything written so that everybody can really talk about the same thing.

Lastly (that's a personal opinion of course) I think that the use of attributes on the examples should be kept to a minimum and encourage people to use classes as it's a much better solution in the long term.

Good luck with that code :-)

comment:3 in reply to:  2 Changed 17 years ago by Frederico Caldeira Knabben

Replying to alfonsoml:

Anyway I think that the Variable Attributes and Styles could be a little too complex for the initial version as it will need to popup a dinamically generated form to the user to query those values. I think that once the work to make sure that everything is working fine it will be a great addition, but with the complexity required to make a style system work all the time, having this feature developed at the same time can take away testing time from the core features.

Well, there is no priority for this, but right from the first version, the system will have to handle the code execution of styles defined with variables. This will be used to handle the font color, or the abbr title for example. Let's see what can be done for the 2.5.

And couldn't the Remove Format command also be replaced now?

Surelly... I've updated the documentation.

When parsing a css file: if a rule such
td span.red { ... }
is found, will the style system make sure that the span.red can be created only inside a td?
I don't think so, but someone will ask

Also, are Id's parsed from the CSS file? Doesn't seem so.

Both cases will be ignored. I've updated the documentation with it too.

As a related question:
if a style is based only in an ID:

<Style label="My Main Header" element="h1">
	<Attribute name="id" value="MainHeader" />
</Style>

Will it be possible to create two of those Main headers in the document (that would be wrong as Id's should be unique)

Well, this will be something to be handled by the developer himself. We can also recommend to not use "id" attributes in styles definitions.

Lastly (that's a personal opinion of course) I think that the use of attributes on the examples should be kept to a minimum and encourage people to use classes as it's a much better solution in the long term.

Surely. One of the hopes I have with this feature is to make everything defined through classes (XHTML 1.1).

The above documentation must explain the technical challenges of the Style System. Let's hope we can provide a better usage style in the developer documentation instead.

Good luck with that code :-)

Thanks... I'll need it :))

comment:4 Changed 17 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

The Style System has been introduced with [774]. Closing this generic ticket. Any issue on it must now have its own ticket.

comment:5 Changed 17 years ago by Alfonso Martínez de Lizarrondo

I might be wrong, but is the ability to parse the css file included? http://dev.fckeditor.net/wiki/Components/Styles#CSSFile

There are two patches in sourceforge with code to do it and also a plugin with other code.

comment:6 in reply to:  5 Changed 17 years ago by Frederico Caldeira Knabben

Replying to alfonsoml:

I might be wrong, but is the ability to parse the css file included?

This feature is being postponed to not delay the 2.5 further. We already have a ticket for it (#901).

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy