I have a web page that consists of the following structure:
There is a certain style associated with the "bodyClass" class, but that style is being overridden in a "divId"-specific style. I am passing the corresponding Class and Id values into FCKeditor as follows:
The style sheet contains the div-specific class defined as the following:
And the page is displayed just fine in the browser. But FCKeditor appears to ignore that style. Through lots of trial and error, I found that for FCKeditor to recognize the id-specific style, I had to name it as follows:
But when I used that name, the browser wouldn't see the id-specific style. So in the end I had to define both versions in the style sheet, one for the browser to use and the other for FCKeditor to use. That shouldn't be necessary. Am I doing something wrong? Is FCKeditor looking for id-specific styles correctly?
<body class="bodyClass"> <div id="divId"> content that is being edited in the editor </div> </body>
There is a certain style associated with the "bodyClass" class, but that style is being overridden in a "divId"-specific style. I am passing the corresponding Class and Id values into FCKeditor as follows:
editor.Config['BodyClass'] = "bodyClass"; editor.Config['BodyId'] = "divId";
The style sheet contains the div-specific class defined as the following:
.bodyClass #divId { (style definitions) }
And the page is displayed just fine in the browser. But FCKeditor appears to ignore that style. Through lots of trial and error, I found that for FCKeditor to recognize the id-specific style, I had to name it as follows:
#divId.bodyClass { (style definitions) }
But when I used that name, the browser wouldn't see the id-specific style. So in the end I had to define both versions in the style sheet, one for the browser to use and the other for FCKeditor to use. That shouldn't be necessary. Am I doing something wrong? Is FCKeditor looking for id-specific styles correctly?
Re: Styles for BodyClass *and* BodyId?
Re: Styles for BodyClass *and* BodyId?
Alfonso,
. I didn't consider the issue that when you pass an id and class to FCKeditor, they are both assigned to the same object, so of course the "#id.class" syntax would be appropriate. But in the original document structure, the id is in a child object of the class object, so the ".class #id" syntax is applicable in that situation. Very confusing, if you're not looking at it from the proper perspecitive
.
Thank you for the prompt response, and forcing me to step back a bit and think about the issue from a document structure perspective. I guess that's what happens when you get too deep into debugging a particular problem