This is a migrated thread and some comments may be shown as answers.

CSS Class dropdown functionality

5 Answers 79 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 01 Dec 2009, 03:36 PM
Hi,

I wonder if the line

<class name="Plaat met rand" value="img.PlaatMetRand" />

would cause the editor to show class "Plaat met rand" ONLY if an image is selected.
Or would this be the the same as

<class name="Plaat met rand" value="PlaatMetRand" />

Can you inform?

Marc



5 Answers, 1 is accepted

Sort by
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 01 Dec 2009, 03:44 PM
In addition to the above mentioned I discovered the following:

In case I have

<class name="Plaat centreren met rand" value="img.PlaatCentreerMetRand" />

This is NOT recognized when I apply in the CSS

.ImgCenterBorder, .PlaatCentreerMetRand {display: block;margin:16px auto 16px auto;border:1px solid #3A267E;}

But recognized if I apply

.ImgCenterBorder {display: block;margin:16px auto 16px auto;border:1px solid #3A267E;} .PlaatCentreerMetRand {display: block;margin:16px auto 16px auto;border:1px solid #3A267E;}

Marc







0
Rumen
Telerik team
answered on 02 Dec 2009, 01:39 PM
Hi Marc

Please, note that the classes collection item in the ToolsFile.xml file is used to restrict the population of all css classes on the page in the ApplyClass dropdown. You should specify the exact class name as a value of the class item that you want to add to the Apply Class dropdown:

<class name="Class Name"  value="Original Class Name" />

You can populate the following classes in the ApplyClass dropdown

.ImgCenterBorder, .PlaatCentreerMetRand {display: block;margin:16px auto 16px auto;border:1px solid #3A267E;}

using the following ToolsFile.xml file declarations:

<classes>
    <class name="Images Class" value=".PlaatCentreerMetRand" />
    <class name="Images Class 123" value=".ImgCenterBorder" />
</classes>

Please, note that you should add a separate item for every class.
If the original class is named img.PlaatCentreerMetRand
then to populate it use this syntax:

<class name="Images Class" value="img.PlaatCentreerMetRand" />

Sincerely yours,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 02 Dec 2009, 02:34 PM
Hi Rumen,

This is not the problem I wanted to bring up.

The point is that it seems to be impossible to read from a comma seperated class line in the CSS

So

<class name="Plaat centreren met rand" value="img.PlaatCentreerMetRand" />

Not applies when in CSS

img.ImgCenterBorder, img.PlaatCentreerMetRand {display: block;margin:16px auto 16px auto;border:1px solid #3A267E;}

I am sorry about the confusion.

Marc


0
Rumen
Telerik team
answered on 02 Dec 2009, 03:06 PM
Hi,

Thank you for the clarification.

The reported scenario is not supported out-of-the box because the names of the classes should be identical to these set in the value attribute of the class tag. In addition the editor does not offer support to restrict comma separated classes and you should rework your css files (that you want to populate in the Apply Class dropdown) to include only separated classes.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 03 Dec 2009, 09:59 AM
MMMmmm, lot of work for 75+ sites :-(

Going to work,
Marc
Tags
Editor
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Rumen
Telerik team
Share this question
or