Some issues with RadEditor

11 posts, 0 answers
  1. Tommy
    Tommy avatar
    8 posts
    Member since:
    Oct 2007

    Posted 04 Mar 2008 Link to this post

    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
  2. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 04 Mar 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Terje
    Terje avatar
    6 posts
    Member since:
    Jun 2007

    Posted 12 Apr 2008 Link to this post

    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
  5. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 16 Apr 2008 Link to this post

    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
  6. Vadimko
    Vadimko avatar
    10 posts
    Member since:
    Feb 2007

    Posted 15 Jan 2009 Link to this post

    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?
  7. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 16 Jan 2009 Link to this post

    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.
  8. Vadimko
    Vadimko avatar
    10 posts
    Member since:
    Feb 2007

    Posted 16 Jan 2009 Link to this post

    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 )
  9. Kristof Claes
    Kristof Claes avatar
    44 posts
    Member since:
    May 2006

    Posted 20 Jan 2009 Link to this post

    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
  10. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 20 Jan 2009 Link to this post

    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.
  11. Kristof Claes
    Kristof Claes avatar
    44 posts
    Member since:
    May 2006

    Posted 21 Jan 2009 Link to this post

    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
  12. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 23 Jan 2009 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017