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

Some issues with RadEditor

10 Answers 452 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Tommy
Top achievements
Rank 1
Tommy asked on 04 Mar 2008, 10:59 AM
Hi,

I use the RadEditor in a number of ways in our (rather complex) web application, and I have come across several issues along the way.

  1. I use "radEditor.Modules.Clear()" to remove the empty panel beneath the editor box. This works fine, except when the editor is created dynamically, then the empty panel is visible regardless. Is there another way to hide it? And why does it show up at all, since it's empty anyway?
  2. I use the RealFontSize tool to set font size, and it sort of works, BUT, when I later open the editor and select the text with, say, font size 14px, the font size DropDownBox will show 4 and not 14px. Presumably the DropDownBox converts to standard HTML font size when reading the selection formatting. To make it even more confusing the HTML code shows 14pt, not pixels (px)! Very confusing for the people using the editor. Any ideas on how to solve this and make it work consistently?

    Related to this, i would prefer for the tool to always show points (pt) for font size, not pixels (px). Is this possible? Not a great issue, but it would be nice.
I hope my explanations are clear enough to understand.
Regards,
TJ

10 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 04 Mar 2008, 05:42 PM
Hi Tommy,

Straight to the points:
  1. Thank you for reporting this issue. Currently, the only possible way to hide the modules in your scenario is to set the ToolsFile property to point to ToolsFile.xml file which does not contain module tags, e.g.

    RadEditor editor3 = new RadEditor();

    editor3.ID = "RadEditor3";
    editor3.ToolsFile = "~/ToolsFile.xml";
    form1.Controls.Add(editor3);

    For your convenience I have attached a sample ToolsFile.xml file.
     
  2. We agree with you that the RealFontSize tool should display the font sizes in pixels or in points but not in the default browser values from 1 to 7. The problem is due to that the browser works with FONT tags and that is why we convert the XHTML compliant SPAN tags with styles to FONT tags in Design mode of RadEditor. During this conversion the

    <span style="font-size: 14px">sample content</span>

    is converted when switching from Html mode to Design mode to

    <FONT size=4>sample content</FONT>

    and back to Html mode to <span style="font-size: 14pt">sample content</span>. For that reason the dropdown header displays 4 in Design mode.

    There were several discussions with clients whether the Real Font Size dropdown should work and display font sizes in pixels or in points. Currently the Real Font Size dropdown works with pixel sizes, but we plan again to change its mechanism to work and display with point sizes.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Terje
Top achievements
Rank 1
answered on 12 Apr 2008, 09:09 AM
Telerik,

What does this mean? Will we no longer be able to use px font sizes?

In our solution, we really need to use px font sizes. We do NOT want to use pt font sizes. (A design descision. Our graphics will be the same number of pixels no matter what platform / point size etc. they are viewed on, we need the text to be the same number of pixels as well.) We have tested Prometheus, but because of problems with the font size dropdown, we have reverted to an older version of the editor.

Really hope these problems will be fixed in the Q1 2008 release, and that we will be able to use px font sizes properly without having them revert back to "2" and "3".

Also, we are absolutely dependent on being able to set a default font size / color, I hope this will be possible as well. Otherwise we'll just have to stick with the Q2 or Q3 version of the editor...


Best Regards,
Terje Krång
0
Rumen
Telerik team
answered on 16 Apr 2008, 10:21 AM
Hi Terje,

We are about to release today the new version of RadEditor "Prometheus", the Real Font Size dropdown of which will apply font sizes in pixels (px). In addition to this, the client-side ConvertFontToSpan filter will convert the font tags with size attributes to span tags with style="font-size" in pixels, e.g.

<font size=1>test</font>
to
<span style="font-size: 10px">test</span>

However, please note that the Real Font Size dropdown header displays the font size value supplied by the browser as they are. It is the browser that displays the values from 1 to 7 when the font sizes in pixels correspond to these browser values. You should not worry about this because the values from 1 to 7 will be converted back to pixels when submitting the content or switching to Html mode.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Vadimko
Top achievements
Rank 2
answered on 15 Jan 2009, 12:54 PM
The problem with RealFontSize dropdown still persists on the 2008.3.1314 build.
Is it possible to rid of font tags in design mode and use span-style elements instead in order to make the browser return font size values in px?
0
Tervel
Telerik team
answered on 16 Jan 2009, 08:34 AM
Hello Vadimko,

At present this is not desireable or even possible.
Certainly, you can turn off the ConvertFontToSpan filer.
Then, if you fill the editor with content that contains spans, they will stay as span elements. However, the browser rich edit engine in IE uses FONT tags when commonly used commands such as FontName, FontSize, ForeColor, BackColor are executed.
What happens next?
The browser engine is not able to optimize the nesting of tags, because it can only do so when FONT tags are used. As a result, a bad mess of deeply nested SPAN and FONT tags occurs - and the more the content is edited, the messier the resulting HTML is.

In case you wish to test this for yourself, you can use the following online demo:
http://demos.telerik.com/aspnet-ajax/Editor/Examples/BuiltInContentFilters/DefaultCS.aspx

To test you need to turn off the ConvertFontToSpan filter first.


Best regards,
Tervel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Vadimko
Top achievements
Rank 2
answered on 16 Jan 2009, 09:12 AM
Hi Tervel!
Thank you for explanation.
It would suffice me to have font handling as it is now, but our designers prefer to see consistent font sizes.
Anyway it's better to have ConvertFontToSpan filter then nothing )
0
Roelande
Top achievements
Rank 1
answered on 20 Jan 2009, 12:59 PM
Hello,

We have enabled "RealFontSize" and "ConvertFontToSpan" so we can use pixel-values instead of point-values for specifying font-sizes.

When I select text and set the font-size to "12px" and look at the HTML-view, it is set correctly to <span style="font-size:12px;">...</span>. Now, when we save the text and open it again, the Editor automatically replaces "px" with "pt". So the span-tag gets changed to: <span style="font-size:12pt;">...</span>.

Since a font-size of 12pt is a lot bigger than 12px, this gives very annoying results.

I have checked our XML-file where we save the text to, and there the pixel-values are stored correctly. So it really is the Editor changing them to point-values while loading the text from the XML-file.

What can be the problem and how can we solve it?

Kind regards,
Kristof
0
Rumen
Telerik team
answered on 20 Jan 2009, 04:10 PM
Hello Kristof,

I tried to reproduce the reported problem but unfortunately to no avail. Could you please, try to reproduce it using the Save In External File example of RadEditor?

If you still experience the problem on your side, please open a support ticket and send a sample fully working project that demonstrates the issue. I will examine it, find the reason for the problem and provide a solution.

Greetings,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Roelande
Top achievements
Rank 1
answered on 21 Jan 2009, 07:59 AM
Hello Rumen,

We are not using the AJAX version of the RadEditor. The version we use is 7.3.4.0 (non-AJAX). Could it be that the problem we are experiencing is only present in that version and not (anymore) in the AJAX version?

If we decide to upgrade from the non-AJAX version to the latest AJAX version of RadEditor, how do we do this? With the non-AJAX version we have a folder structure like \RadControls\Editor\ in the root of our web application and in that folder are some config files and subfolders containing scripts, dialogs and skins.

I have noticed that in the new AJAX version, there is no RadControls folder anymore. Is everything (like skins and scripts) included in the new big Telerik.Web.UI.dll? If so, how do we set the options that were previously located in ConfigFile.xml and ToolsFile.xml?

I have already downloaded the RadControls for ASP.NET AJAX 2008.3 suite, browsed through the folders and skimmed through the help files, but I couldn't find anything detailed enough covering this topic.

Kind regards,
Kristof
0
Rumen
Telerik team
answered on 23 Jan 2009, 06:02 PM
Hi Kristof,

I tried to reproduce the reported problem in RadEditor Classic 7.3.4 but without success. You can see my test in the attached video.

If you decide to upgrade to the new and better RadEditor for ASP.NET AJAX, please note that you should Ajaxify your project.  You do not need the RadControls folder at all with the new editor. Everything is built into the Teleik.Web.UI dll - scripts, skins, even the dialogs - which are accessed by using a http handler.

Please, see the following guidance article which provide migration instructions for switching to RadEditor for ASP.NET AJAX: Migration from RadEditor Classic to RadEditor for ASP.NET AJAX.

If you need to modify the editor's dialogs, skins and / or scripts, you can see the following articles:
ExternalDialogsPath property and Disabling embedded resources.


Kind regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Tommy
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Terje
Top achievements
Rank 1
Vadimko
Top achievements
Rank 2
Tervel
Telerik team
Roelande
Top achievements
Rank 1
Share this question
or