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

[Solved] Issue in RadEditor Applying css style

2 Answers 119 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Shubod Dev
Top achievements
Rank 1
Shubod Dev asked on 29 Oct 2009, 06:33 AM
Hello
This is Karthik from bangalore. i have some issues in fire-fox in rad editior. rad editor have one feture called apply css class dropdown tool in tool bar.i bind the css file in server side its working fine IE all the version but fire fox getting problem please check it attached file u will find out the proplem. Please give me the solution for this how to solve this problem.. Here by i pasted my server side Code for your reference..

  RadEditor1.CssFiles.Clear()
        If odb.IsExist("SELECT [StyleSheetID] FROM [" & ClientName & "].[dbo].[Templates] WHERE [TemplateID] = " & TemplateID) Then
            Dim AllCSSFiles As New DataTable
            AllCSSFiles = odb.GetDataTable("SELECT [StyleSheetID] FROM [" & ClientName & "].[dbo].[Templates] WHERE [TemplateID] = " & TemplateID)
            For Each CSSFile As DataRow In AllCSSFiles.Rows
                RadEditor1.CssFiles.Add("http://" & hidStageUrl.Value & "/CSS/css_" & Val(CSSFile("StyleSheetID")) & ".css")
            Next
        End If

Thanks & Regards
Pl.Karthik


2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 02 Nov 2009, 04:25 PM
Hi Karthik,

This scenario is not supported because due to potential vulnerabilities the Firefox browser security does not allow the javascript to read the styles from the different domain. You should always load styles from the same domain

The css file path should not point to another domain because Firefox will restrict this file and the editor will be not able to read the classes in it. That is why this code will work only in IE:

RadEditor1.CssFiles.Add("http://" & hidStageUrl.Value & "/CSS/css_" & Val(CSSFile("StyleSheetID")) & ".css")

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
Shubod Dev
Top achievements
Rank 1
answered on 03 Nov 2009, 07:36 AM
Hi Rumen

Thanks for explanation. Now i cleared about issue

Thanks & regards
PL.Karthik
Tags
Editor
Asked by
Shubod Dev
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Shubod Dev
Top achievements
Rank 1
Share this question
or