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

Problem with Paragraph drop down list

9 Answers 129 Views
Editor
This is a migrated thread and some comments may be shown as answers.
ChrisS
Top achievements
Rank 1
ChrisS asked on 21 Apr 2008, 03:47 PM

I have used the following code to set the style sheet for the RAD Editor:

        Dim l_colCSSFiles As EditorCssFileCollection            ' The collection of RAD Editor CSS files.  
 
        ' Read back the current colleciton of css files.  
        l_colCSSFiles = radEditor.CssFiles  
 
        ' Add the new css file to the collection.  
        l_colCSSFiles.Add(New EditorCssFile("~/assets/css/customRadEditor.css"))  
 

Unfortunately, for the paragraph drop down list the RAD Editor is picking up the heading styles from the page css instead of the custom rad editor.

Am I doing something wrong, or is there a problem?

Many thanks

9 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 24 Apr 2008, 06:29 AM
Hello Chris,

I made the following test: I used the provided code to load the external customRadEditor.css classes in the Apply Class dropdown and FormatBlock tool. I defined a global h1 {color: green;} class in the customRadEditor.css and when I applied Heading 1 formatting from the FormatBlock dropdown to the selected content it was wrapped inside H1 tags with green color.

After that I defined a global H1 class

    <style>
    h1
    {
          color: blue; font-size: 40px;
    }
    </style>

in the page with the editor. This class colorized the Heading 1 text item in the FormatBlock tool in BLUE, however the Heading 1 dropdown item continued to apply a green heading 1 formatting to the selected content.

You can see the attached video for more information.

Is this the problem that you experience?
What should be the expected behavior?

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ChrisS
Top achievements
Rank 1
answered on 24 Apr 2008, 06:53 AM
Dear Rumen,

> Is this the problem that you experience?
Yes this is the problem.
> What should be the expected behavior?
The look of the heading tags in the paragraph drop down list should follow the customRadEditor.css and not the global heading tag.  In the example you give, the user is selecting a blue heading tag and it appears in green.  That cannot be right?

In the previous version of the RAD Editor the items in the paragraph drop down list matched customRadEditor.css and I would expect the new version to do the same.

Is this a problem with the new version of the RAD Editor or have I done something wrong?

Many thanks
0
Rumen
Telerik team
answered on 25 Apr 2008, 09:23 AM
Hi Chris,

Thank you for the clarification.

I logged the problem in our bug tracking system and we will try to correct it for the one of the upcoming updates of RadControls for ASP.NET AJAX.

As a small note of gratitude for your feedback and I updated your Telerik points.


Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ChrisS
Top achievements
Rank 1
answered on 25 Apr 2008, 12:13 PM
Dear Rumen,

As my project cannot go live until this issue is fixed can you let me know which upcoming update of RAD Editor this issue will be fixed in?

If this could be fixed in the SP1 update that would be great.

Many tahnks
0
Rumen
Telerik team
answered on 25 Apr 2008, 02:02 PM
Hi Chris,

The issue is logged with high priority and we will try to fix it for the SP1 release.

Have a nice weekend,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ChrisS
Top achievements
Rank 1
answered on 16 May 2008, 09:14 AM
Dear Rumen,

Has this issue been fixed in the SP1 release?

Many thanks
0
Rumen
Telerik team
answered on 19 May 2008, 02:21 PM
Hi Chris,

Unfortunately, we do not have enough time to fix this problem in the SP1 release. I will notify you right away once our developers fix the problem locally.

Please, excuse us for the temporary inconvenience.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Fabio Honigmann
Top achievements
Rank 2
answered on 20 Jan 2009, 08:12 PM
Apparently this issue has still not been fixed.

Any plans on doing so?

0
Rumen
Telerik team
answered on 26 Jan 2009, 02:09 PM
Hi Fabio,

The current dropdown implementation is based on DIV elements, which are located on the same page where the editor resides and they pick up the styles from the page.

If we decide to implement your request we have two options:
  • The first one is to use IFRAME element for the dropdown popup, which is another document, which will not inherit the styles from the parent page. Unfortunately, this implementation will decrease the RadEditor loading speed and for that reason it is not reliable.
  • The other option is to implement a parsing functionality similar to this one used in the Apply Class dropdown. The problem here is that the css classes have different names and it is easy to parse them while the global classes for the different tags has identical names and it is not easy to parse them.

You see that both implementations have their side effects and for that reason we have decided to not implement them.

The easiest way to solve the problem is to import the same classes that you load in the FormatBlock tool via the CssFiles property using a LINK tag or a STYLE tag.  Unfortunately, this solution has a side effect and it is that these global heading styles can spoil the appearance of the page with the editor.

Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
ChrisS
Top achievements
Rank 1
Answers by
Rumen
Telerik team
ChrisS
Top achievements
Rank 1
Fabio Honigmann
Top achievements
Rank 2
Share this question
or