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

Custom Styles in HTML with Firefox

8 Answers 74 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
weidner
Top achievements
Rank 1
weidner asked on 30 Jul 2007, 02:51 PM
When i add a new text with its own style tag in HTML and edit it afterwards it causes Firefox to drop the style tags.

Original:
&nbsp;<style>.txt {font-family:verdana;}</style>
Text!<br />
<span class="txt">Text!</span><br />

Firefox2 (style tags are lost):
<div class="ExternalClass223DBA9FBB184CA1928713C7160113B7">
Text!<br />
<span class="txt">Text!</span><br />
</div>

IE7 (everything is fine):
<div class="ExternalClass223DBA9FBB184CA1928713C7160113B7">
 <style>.ExternalClass223DBA9FBB184CA1928713C7160113B7 .txt {font-family:verdana;}</style>
Text!<br />
<span class="txt">Text!</span><br />
</div>

Is this a bug or a configuration issue?

8 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 31 Jul 2007, 08:50 AM
Hi weidner,

I tried to reproduce the reported problem in Firefox 2.0.0.6 with a default editor configuration as well as by setting ConvertFontToSpan and ConvertToXhtml to true, but without success. You can see my test in the attached video. Am I missing something?

Are you able to reproduce the problem with the Content Filters example of RadEditor? If yes, please provide step-by-step instructions how to reproduce the issue on our end.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
weidner
Top achievements
Rank 1
answered on 31 Jul 2007, 09:49 AM
Hi Rumen,

it was quite simple to reproduce with your Content Filters example. I changed the style information to color, because it is easier to recognize this way (maybe thats the reason why you didn't notice it).

1. enter the HTML View
2. delete everything
3. paste the following:
<STYLE>.txt {color:red;}</STYLE>
Text!<BR><SPAN class=txt>Text!</SPAN><BR>
4. switch back to the design view
5. disable all options and press apply

IE7: Everything is fine and looks the same
Firefox2: Is so kindly and deletes the style info for us. The code looks like this now: Text!<br><span class="txt">Text!</span><br>

I tried all options and it was always the same result.

Kind regards
Stefan Weidner

0
Rumen
Telerik team
answered on 31 Jul 2007, 11:57 AM
Hi Stefan,

We researched the issue in details and we found that it is a default Firefox behavior. If you have some style tag in the content, then the browser automatically puts the <STYLE> tags in the HEAD tags. You can easily test this by placing the following content in HTML mode

<html><head></head><body>
sample content
<style>
       .page {background: #008dcf url(Images/bg_tennis.jpg) bottom center no-repeat;}
</style>
sample content
</body>
</html>

and submitting the content or just switching between HTML and Design modes. You will noticed that the <STYLE> tags will be placed inside the <HEAD> tags after the postback operation.

If you load however content that does not have HTML and HEAD tags, then the browser will move again the STYLE tag and it will be not visible in the content area. You can observe that the issue does not exist when working with full HTML page content (content that includes HTML, HEAD and BODY tags).

Our developers are researching the problem and we will do our best to fix it in the future, but it will be a hard task since the observer behavior is controlled by the browser.

Currently, you can put your txt class in the following css file  /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/4.3.0.0__1f131a624888eeed/RadControls/Editor/CssEditor.css

which RadEditor reads and loads the classes in it in the Apply Css Class dropdown. Once you put the txt class inside the CssEditor.css, the Apply Css Class dropdown will be load it as an item and your users will be able to apply it over the selected content.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
weidner
Top achievements
Rank 1
answered on 31 Jul 2007, 12:21 PM
Hi Rumen,

many many thanks for analyzing the problem. We use the radeditor to replace the default list editor in moss. The content is edited by a lot of users. Your solution wont help us, because we dont want to manage 1.000+ css-styles via drop-down :)

The solution is simply to force them to use <html> tags around their content. Its not the clean method, but at least it works for now.

Best regards
Stefan Weidner

0
weidner
Top achievements
Rank 1
answered on 03 Dec 2007, 06:46 PM
Hi, sorry for fetching this old old thread from some deep deep forum depths, but its easier then opening a new one.

The problem still exists, anything new about it?

Best regards,
Stefan

0
Rumen
Telerik team
answered on 04 Dec 2007, 08:39 AM
Hi Stefan,

I have good news that this issue is fixed in RadEditor "Prometheus"

We are porting the new content filters of RadEditor "Prometheus" to the classic RadEditor and this will fix the problem in the classic RadEditor, the core of which is used in RadEditor MOSS. The official release is scheduled for mid December and after that we will update the RadEditor version for MOSS too.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
weidner
Top achievements
Rank 1
answered on 12 Dec 2007, 03:42 PM
This sounds great :)

Currently we are using version 4.4.1 since its the classic editor for moss will the update be free of charge?
0
Rumen
Telerik team
answered on 12 Dec 2007, 04:08 PM
Hi,

The upcoming classic editor's update will be v7.5, which is a minor version and it will be free for all customers having license of RadEditor 7.x.

The same is true for the MOSS editor using as a core version 7.x of the classic editor.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
WebParts for SharePoint
Asked by
weidner
Top achievements
Rank 1
Answers by
Rumen
Telerik team
weidner
Top achievements
Rank 1
Share this question
or