Applying styles to paragraphs inconsistent

28 posts, 0 answers
  1. Mick
    Mick avatar
    1 posts
    Member since:
    Sep 2008

    Posted 05 Sep 2008 Link to this post

    We have a CMS that is using RadEditor. Most of the time, the content is being copied from word, stripping everything out, which works fine. The content comes in in propert <p> tags. The problem arises when the user starts applying styles.
    For example, if I have a style set as:
    .BodyText
    {
       font-family: Arial;
       ...
    }
    In my content I have
    <p class="Word class">Test</p>
    I highlight the text and apply my style from the dropdown. Sometimes it works, other times it will format the following:
    <span class="BodyText"><p class="Word class">Test</p></span>
    OR
    <p class="Word class"><span class="BodyText">Test</span><p>

    Unfortunately, this html content has to be converted into a structured xml document that using the class definitions as attributes. This will not work if the content editor cannot apply styles consistently. Has anyone had similar problems, and/or any recommendations for how to approach this issue?

    Regards,

    Mick
  2. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 08 Sep 2008 Link to this post

    Hi Mick,

    I was able to reproduce the problem and notified our developers about it. We will do our best to fix this bug for Q2 SP2 2008 of RadControls for ASP.NET AJAX.

    We do appreciate your feedback and I updated your Telerik points.

    Regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. David
    David avatar
    57 posts
    Member since:
    Nov 2004

    Posted 08 Sep 2008 Link to this post

    Please, Please, PLEASE...  Fix this!!

    http://www.telerik.com/community/forums/thread/b311D-bckktd.aspx

    http://www.telerik.com/community/forums/thread/b311D-beggdc.aspx

    http://www.telerik.com/community/forums/thread/b311D-bkdmde.aspx

    This is my #1 issue with the editor!  I keep telling clients how, ideally and soon, they shouldn't need to go into html view to verify/fix their html. 

    Doing very basic editing with basic tags; p, h1-6, links, lists, etc., .. applying/removing styles.. should not require more than the most basic knowledge of html or a trip to html view.


    Thanks.. David
  5. Jeff Van Dyk
    Jeff Van Dyk avatar
    12 posts
    Member since:
    Oct 2012

    Posted 09 Sep 2008 Link to this post

    Our company is experiencing this problem as well with most of our clients.  This is causing us a lot of extra support work.  We would really appreciate a fix for this as soon as possible.


    Thanks, Jeff
  6. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 09 Sep 2008 Link to this post

    Hi guys,

    We understand that this problem is critical for you and the issue is logged with high priority in our bug tracking system. We will do our best to fix it in the next SP2 release of Telerik.Web.UI.

    If our developers fix the problem in advance I will notify you right away.

    Best regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Stewart Ellis
    Stewart Ellis avatar
    21 posts
    Member since:
    Feb 2006

    Posted 15 Sep 2008 Link to this post

    I just discovered this issue myself and was quite suprised.

    This posting is to just get me on the email notification regarding this issue and to tell you good folks at Telerik that I too consider this to be very top of the bug list.

    Thanks in advance
  8. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 16 Sep 2008 Link to this post

    Hi Stewart,

    Of course, I added your email to the notification list and I will notify you once the build is ready.

    Greetings,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  9. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 02 Oct 2008 Link to this post

    Hi guys,

    I just want to inform you that yesterday we released SP2 of RadControls for ASP.NET AJAX. The release features a new content filter to remove extra spans from the editor content.

    We also applied various heuristics to determine whether a font/span tag is fully selected or not. This improves the behavior of "Apply Class" and other dropdowns. For example selecting all LI items in a list causes the class to be applied to the LIST itself.

    You can find a list of all updates in the release here:
    http://www.telerik.com/VersionNotes.aspx?Id=1397

    We strongly suggest testing and upgrading to the new version since it is much improved over its predecessor.


    Best regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  10. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 18 Oct 2008 Link to this post

    I just upgraded a project to Q2 hoping this would be fixed.  Upon loading some content in the editor, I view the source and see this:

    <p>
    Some content...
    </p>

    Then, from the design view, I click inside the paragraph and then click on the P in the module at the bottom where you see all of the HTML elements.  When I do this, the entire paragraph is highlighted.  I click on the Apply CSS Class drop-down and select a class.  This is what I see:

    <p><span class="LinksCategory">
    Some content...
    </span></p>

    As I understand it from this thread, I should be seeing the class applied to the P tag.  Am I doing something wrong, or is this not yet completely fixed?

    Thank you.
  11. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 20 Oct 2008 Link to this post

    Hi Barry,

    In the Q2 version that you have downloaded the problem exists.

    This problem is fixed in Q2 SP2 of RadControls for ASP.NET AJAX as well as in the new "Futures build".

    You can download both version from the My Licenses -> My Free Trials section under your Client.net account. See the attached screenshot for more information.


    Best regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  12. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 20 Oct 2008 Link to this post

    I got a little confused on versions here.  I have Q2 installed, and when I downloaded the latest version (SP2), it gave me some message about having to uninstall first if I wanted to reinstall this version.  It gave me the impression I already had the latest version installed, so I didn't continue.  When I checked the dates just now, I see that I was wrong.  (I have a paid version under another login, BTW, so your message confused me further.)

    I'm downloading and installing that now.  Thanks for the information.

  13. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 20 Oct 2008 Link to this post

    Ok, upgrade completed and verified.

    I do this in Firefox (3.0.3), and it hasn't changed.  (See above description; I'm seeing the exact same behavior.)  I even cleared cache, rebooted, started Firefox without any previous tabs opened., did a shift-refresh, and did everything I could think of to make sure it's "clean".  No change.

    I decided to try IE7, and there I see it operating as I would help.  The resulting output is:

    <p class=LinksCategory>
    Some content...
    </p>

    (By the way, shouldn't there be quotation marks around the class name?)

    Has this been tested in Firefox??

    Thank you.

  14. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 21 Oct 2008 Link to this post

    I just went back to look at some older threads.  It appears this isn't slated to be fixed until Q3.

    http://www.telerik.com/community/forums/thread/b311D-beggdc.aspx

    Is this correct?

  15. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 23 Oct 2008 Link to this post

    Hi Barry,

    As I wrote in my previous reply the problem existed prior Q2 SP2 (2008.2.1001).

    I made a test with the latest Futures release in IE7 and Firefox 3.0.3 and I was not able to reproduce the problem. I used the Default Example of the editor in my test environment and tested with the following content

    <p>sample</p>
    <p>content</p>

    You can see in the attached video that the class attributes was correctly applied to the <p> tags and that the ConvertToXhtml filter of RadEditor sets the stripped quotes by IE when switching to Html mode, e.g.

    <p class="qsfRight">sample</p>
    <p class="qsfTicked">content</p>

    The editor's content filter are fired when switching to Html mode or submitting the content. So you should not worry about the missing quotes. They will be set by the ConvertToXhtml client filter which is enabled by default.

    Could you please, see the video and let me know if I am missing something? Please, provide steps to reproduce the problem in the Futures build (2008.3.1016).

    Best regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  16. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 23 Oct 2008 Link to this post

    Hello Rumen:

    Initially, you stated that the problem is fixed in Q2 SP2.  In this latest statement, you say it existed prior to Q2 SP2, and appears to be fixed in the futures build - specifically leaving out the status of the current build (Q2 SP2).  One can assume that the current release does not have it fixed.

    I don't mean to pin you down on grammar or semantics.  I just wanted to know if I should expect it to work or not.  I'm going with "not" in this release (Q2 SP2).

    I watched the video, and that's the exact behavior I expect to see, and what I was doing in my tests.

    My conclusion:  Fixed in the futures build, and not the current production release

    Thank you.

  17. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 23 Oct 2008 Link to this post

    Hi Barry,

    Please, excuse me if I have mislead you somehow with my testing. I tested right away the same scenario with Q2 SP2 version and I was able to verify that this problem is fixed in this version too.

    For your convenience I have attached a new WinRar video which you can see.

    If you do not have winrar on your pc, just let me know and I will send a zipped version.

    Kind regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  18. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 23 Oct 2008 Link to this post

    Hello Ruman,

    This was the same video I watched.

    I'm able to shed more light on this.  If the paragraph is embedded inside a div, it's not working.  If I start with this content:

    <div>
    <p>Hello</p>
    </div>

    then select the paragraph and apply a style, I get this:

    <div>
    <p><span class="class1">Hello</span></p>
    </div>

    It appears that it doesn't like to be embedded within another DIV.  Note that I simplified this down the the barest possible content to recreate the problem.

    Thanks.

  19. Martin
    Admin
    Martin avatar
    585 posts

    Posted 27 Oct 2008 Link to this post

    Hello Barry,

    It looke like a faulty CSS inheritance issue. Could you try the following:

    Locate the class1 css class, and then force its properties with the !important flag, i.e:

    .class1
    {
        color: red !important;
    }


    Also, in the css rule declaration, notice if the rule is correct, because, for example:

    p span .class1
    {
        color: red;
    }

    is not the same as:

    p span.class1
    {
        color: red;
    }



    Greetings,
    Martin Ivanov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  20. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 27 Oct 2008 Link to this post

    Martin:

    You've gone completely off course from the focus of this thread.

    Using the Telerik editor's apply class drop-down, I simply want to apply a css class to a paragraph, and that shouldn't be hindered by what the paragraph might be embedded in.  For example, I can go from:

    <p>Some content</p>

    to:

    <p class="MyClass">Some content</p>

    However, I cannot go from:

    <div>
    <p>Some content</p>
    </div>

    to:

    <div>
    <p class="MyClass">Some content</p>
    </div>

    This should be possible.

  21. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 28 Oct 2008 Link to this post

    Hi Barry,

    You are correct that Martin who provided the last answer misunderstood the focus of the thread.
    Let me go a message back and quote your observations:

    <quote>
    My conclusion:  Fixed in the futures build, and not the current production release
    </quote>

    That is correct. When releasing the SP2 we believed we had all such issues covered. And they were... in FF2, and all other browsers - with the exception of FF3. It later turned out that in FF3 there have been changes to the built-in browser selection object. It behaves in a different manner compared to FF2 - and what is worse - it behaves in a strange way.

    Nonetheless, we developed a workaround that covers in FF3 - among other things - the exact scenario that you report, and that workaround was included in the Q3 2008 Futures build.

    I hope this information summarizes the essence of the thread and that it can be closed now.

    Best wishes,
    Tervel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  22. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 28 Oct 2008 Link to this post

    Hello Tervel,

    Thank you very much.  I downloaded and tested the beta for Q3, and it did work in FF3.

    While I don't plan on deploying the beta Q3 in a production environment, I can at least tell my clients the true nature and status of the problem.  They can use a different browser for editing if they're using FF3.

    Yes, by all means.  We can close this thread.

    Thank you.

  23. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 20 Nov 2008 Link to this post

    This makes me kind of sad...

    I've just upgraded to Q3 for .Net 3.5, and I tried this scenario.  It's not working again.

    Here is my starting HTML:

    <div> 
    <p>Class 1</p> 
    <p>Class 2</p> 
    </div> 

    When I'm in the editor, I click inside the text "Class 2".  I click on the P in the DOM browser thing at the bottom, and I see the text "Class 2" highlighted/selected.  I then click on the "Apply Class" drop-down and select "Class2".  Unfortunately, it applies the class specification to the first paragraph instead of the second.  This is in Firefox 3.0.4.  It works properly in IE.

    I appreciate your checking into this.


  24. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 24 Nov 2008 Link to this post

    Hi Barry,

    I was able to reproduce the problem. I reported it to our developers and we will do our best to fix it as soon as possible.

    As a small compensation for experiencing this problem I updated your Telerik points. Please, excuse us for the temporary inconvenience.

    Kind regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  25. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 24 Nov 2008 Link to this post

    Thank you.

    I'm looking forward to the fix - and happy with the points, too.  :)
  26. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 23 Jan 2009 Link to this post

    I'm sad...

    I just downloaded the latest SP/hotfix, and the problem still exists in FireFox.

    Was this supposed to be fixed, or are we waiting for another future release?

    Thank you for the update.
  27. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 26 Jan 2009 Link to this post

    Hi Barry,

    The problem is not yet fixed because it is logged with low priority in our bug tracking system. The issue happens only in Firefox. The defect does not appear if the user selects the paragraph content with the mouse.

    That is why my suggestion is disable the DOM Inspector modules until we fix the problem:

    <telerik:RadEditor ID="RadEditor1" runat="server" OnClientCommandExecuting="OnClientCommandExecuting">  
    <Content>
        <div>
        <p>Class 1</p>
        <p>Class 2</p>
        </div>
    </Content>
    <Modules>
        <telerik:EditorModule Name="RadEditorNodeInspector" />
        <telerik:EditorModule Name="RadEditorStatistics" />
    </Modules>
    </telerik:RadEditor> 

    Unfortunately, I cannot provide an exact time estimate when the bug will be fixed.

    Best regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  28. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 26 Jan 2009 Link to this post

    Thank you for the update (though I don't understand the purpose of the partial code sample you put in there).

    I would like to lobby for at least normal priority on this. 

    Selecting the paragraph via the DOM module make sense to me because it is perfectly clear that you are selecting the paragraph and not the content in it.

    Thanks.
  29. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 29 Jan 2009 Link to this post

    Hi Barry,

    The purpose of the code below is to reset the default modules collection of RadEditor and to show only the Node Inspector and Statistics modules:

    <Modules>
        <telerik:EditorModule Name="RadEditorNodeInspector" />
        <telerik:EditorModule Name="RadEditorStatistics" />
    </Modules>

    Thus your users will be not able to use the DOM Module and will not experience the reported problem.

    Unfortunately, I could not provide an estimate date when this glitch will be fixed.

    Best 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