+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Trailing paragraphs added in Generic Content control

Trailing paragraphs added in Generic Content control

19 posts, 0 answered
  1. Terrence
    Terrence avatar
    23 posts
    Registered:
    23 Mar 2009
    07 Jun 2009
    Link to this post
    Hi there

    I am migrating my content from Microsoft Word into Sitefinity using the Generic Content control. I used the "Copy from Word" option in the right-click dialog menu.

    However, upon publishing the content, I find that there is a HUGE gap at the bottom, even though when I clicked "I'm Done", there are NO spacing after the last line.

    I went back to the Edit screen and edited the Generic Content control and found that there are trailing paragraphs added after my last line. Upon removing them, I published it again and again it appears!

    I am only successful in removing them when I go into HTML and remove the <p> tags altogether. But, if I edit the text in any way, the paragraphs are automatically added again!

    This is very frustrating and really bothersome. Please help!

    best regards
    Terrence
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    10 Jun 2009
    Link to this post
    Hi Terrence,

    Could you please try to paste-from-word your content in our online demos? If you reproduce the problem, I suggest you to create a Editor ContentFilter, which strips the empty trailing P tags. It could be a regular expression matching what you get, and removing it.

    Please let us know if you have reproduced the problem on our demos as well.

    Greetings,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Terrence
    Terrence avatar
    23 posts
    Registered:
    23 Mar 2009
    10 Jun 2009
    Link to this post
    Hi Georgi

    I pasted it into the demo and it is working fine.

    So what could be a possible cause for the break in my Sitefinity site's RADEditor?

    Also, I noticed that there is a table button in the RADEditor toolbar. Is this feature available in Sitefinity's version? Could you direct me to the documentation to enable it please? Thank you very much.

    Best regards
    Terrence
  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    11 Jun 2009
    Link to this post
    Hi Terrence,

    Could you please send us the document that you are pasting through paste-from-word option? Before that, you could try the following.

    1. Open the Generic Content template that you use.
    2. Try to remove the following filters:
    <telerik:RadEditor 
    ... 
    ContentFilters="FixUlBoldItalic,FixEnclosingP,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent">  

    The highlighted ones should be removed. Please check if there are still tags appended at the end.

    All the best,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Terrence
    Terrence avatar
    23 posts
    Registered:
    23 Mar 2009
    11 Jun 2009
    Link to this post
    Hi Georgi

    Thanks for the reply. Do you wish for me to upload the document via the Support Ticket?

    I will try the code that you have sent right now.

    Thanks much
    Terrence
  6. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    15 Jun 2009
    Link to this post
    Hi Terrence,

    Do you have any results?
    You can upload files only in the support threads, so let's keep the communication there.

    Greetings,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Dennis
    Dennis avatar
    19 posts
    Registered:
    26 May 2009
    15 Jun 2009
    Link to this post
    I have a question for the Generic Content - I am missing the "Insert Table" button.

    Is that not part of the free edition?

    Best regards, Dennis
  8. Terrence
    Terrence avatar
    23 posts
    Registered:
    23 Mar 2009
    16 Jun 2009
    Link to this post
    Hi Dennis

    You are right, it is packaged into Sitefinity - just that it has not been enabled as yet.

    You will need to get to the EditorToolsFile.xml located in your project to add it into your Sitefinity RadEditor. The line that you need to add into your EditorToolsFile.xml is:
    <tool name="InsertTable" /> 

    With this XML file, you can pretty much customise your Sitefinity RadEditor tool to have whichever buttons that you want or need. Here is a link to the full documentation of the RadEditor Toolbar, how to customise it and how to add buttons. You would want to pay some attention to the Adding Standard  Buttons sub-section.

    http://www.telerik.com/help/aspnet-ajax/toolbarintro.html

    This is what I've learnt during my exploration of Sitefinity. Hope that helps.

    Best regards
    Terrence
  9. Dennis
    Dennis avatar
    19 posts
    Registered:
    26 May 2009
    01 Jul 2009
    Link to this post
    Thank you very much for this answer.

    When I'm using the "Insert link" (Link Manager) - I am missing the option to set the target property. - I can only set "Url Address", "Text" and "Tooltip"

    Can you tell me how to get the "Target" property?

    Regards, Dennis
  10. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    08 Jul 2009
    Link to this post
    Hi Dennis,

    The following KB Article will help you - How to extend the custom RadEditor dialogs.
    Let us know if you have further questions.

    Best wishes,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  11. Jepoy
    Jepoy avatar
    7 posts
    Registered:
    01 Apr 2011
    28 Apr 2011
    Link to this post
    hello Support.

    I have question why when i apply paragraph the p-tag wrap my contents disappear?

    here's the steps i did:
    1. in the html editor: highlight the content that i want to apply the p-tag / paragraph
    2. select items with p-tag option from paragrapdropdown e.g. Paragraph (this has <p> value)
    3. as the result it didn't wrap with p-tag to my content.

    thanks.
    jepoy
  12. Jepoy
    Jepoy avatar
    7 posts
    Registered:
    01 Apr 2011
    28 Apr 2011
    Link to this post
    I tried it in the demo and seems like when i apply the paragraph tag it's stripping p-tag out.
    i wonder why and i using original version.
    I am just new to this tool. a little help would really be appreciated.
    because i am stuck in here and i read forums in here sad to say i am not able to follow through..

    thanks
    jepoy.
  13. Jepoy
    Jepoy avatar
    7 posts
    Registered:
    01 Apr 2011
    28 Apr 2011
    Link to this post
    I wanna clarify my problem:

    my objective is to wrap the phrase "the quick brown fox" with p tag from html editor
    so after i have applied paragraph tag it would look something like in the html tab of the editor "<p>the quick brown fox</p>"

    Problem: using telerik radeditor (html editor) after i click the dropdown paragraph which value was defined as  radEditor.Paragraphs.Add("Paragraph", "<p>"); in the .cs file. when i view the html tab the phrase is not wrap by p-tags.

    FYI. I am getting same problem even with the telerik html editor demo or sample apps.
    I don't know if do i need to add something or what should i do to make this work?

    i don't know if i will get reply from this because before when i post something i am not getting any response. and i don't know what are the requirements (sine im new here) to make my post be a valid post.

    regards,
    jepoy...
  14. Rumen
    Rumen avatar
    26 posts
    Registered:
    09 Dec 2016
    03 May 2011
    Link to this post
    Hello Jepoy,

    By default, Internet Explorer wraps the content inside a paragraph tag - this is the default root <p> tag. If this tag is missing the browser automatically adds it. We got many request however to change this behavior, because it was 'tricking" the validators to believe that there is content in the editor. Secondly it was spoiling the layout of page because the content loaded in the editor without the paragraph would be returned surrounded by a paragraph.

    That's why we decided to change this by implementing the FixEnclosingP content filter which removes this root paragraph. If you need this paragraph tag then just disable this filter using the DisableFilter server method of RadEditor or the ContentFilters property, e.g.
    RadEditor1.Paragraphs.Add("Paragraph", "<p>"); 
    RadEditor1.DisableFilter(EditorFilters.FixEnclosingP);


    After disabling this filter the wrapping P tag will be not stripped by RadEditor.

    Please, note that if you have more than one paragraphs in the content area:
    <p>line1</p>
    <p>line2</p>
    <p>line3</p>

    then the FixEnclosingP filter will not strip them.

    Greetings,
    Rumen
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  15. Jepoy
    Jepoy avatar
    7 posts
    Registered:
    01 Apr 2011
    04 May 2011
    Link to this post
    Hello Rumen,

    Greetings...

    I updated our code and followed your instruction.

    Protected Sub radEditor_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles   
    radEditor.PreRender
                With radEditor
                    .Paragraphs.Clear()
                    .Paragraphs.Add("Clear Formatting", "<p>")
                    .Paragraphs.Add("Heading 1", "<h1>")
                    .Paragraphs.Add("Heading 2", "<h2>")
                    .Paragraphs.Add("Body", "<body>")
                    .Paragraphs.Add("Paragraph", "<p>")
                    .DisableFilter(Telerik.Web.UI.EditorFilters.FixEnclosingP)

                End With
            End Sub


    but it doesn't make any changes...

    Steps to recreate:
    1. in html editor i have <p>hello</p>
    2. highlight that
    3. apply paragraph tag
    result: it removes the p-tag. However if the content doesn't have <p> tag, when apply paragraph style it doesn't wrapped the highlighted content with <p> tag... kind of weird... any idea why???


    Sincerely Yours,
    Jepoy
  16. Rumen
    Rumen avatar
    26 posts
    Registered:
    09 Dec 2016
    06 May 2011
    Link to this post
    Hello Dennis,

    Your configuration is correct. Please, ensure that you are testing with the latest Q1 2011 SP1 version 2011.1.413 of Telerik.Web.UI.dll.
    You can see my test in the following video: http://screencast.com/t/NW1v5rz0vPz1

    All the best,
    Rumen
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  17. Jepoy
    Jepoy avatar
    7 posts
    Registered:
    01 Apr 2011
    06 May 2011
    Link to this post
    Hello Rumen,

    Regarding for the latest patch, do we need to buy for that one or it's ready for download and install?
    I probably need to notify our architect here in that matter.

    I believe I am running under 2010 version.

    Regards,
    Jepoy
  18. Rumen
    Rumen avatar
    26 posts
    Registered:
    09 Dec 2016
    06 May 2011
    Link to this post
    Hello Jepoy,

    I examined your account and noticed that you are not added as a licensed developer by the license holder to the purchased license. Could you please ask the license holder to add you as a licensed developer so that I can see whether you are allowed to download for free the Q1 2011 SP1 build. Another approach is to open a support ticket and send the license holder name and e-mail address so that I can inspect his / her licenses.

    Best regards,
    Rumen
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  19. Jepoy
    Jepoy avatar
    7 posts
    Registered:
    01 Apr 2011
    10 May 2011
    Link to this post
    Hello Rumen,

    Good Day.
    Yeah, I am not added as licensed developer by the license holder. I think this is beyond my scope and I will raise this concern to our architect and I will highlight the things that we have discussed here. :-)

    Weeeewwww finally I now understand the reason of my issue hehehe.. thank you so much for your usual support I do really appreciate it.

    Oh FYI, I think it's gonna be other team who'll contact telerik to discuss this one I will provide this link for the history.

    Cheers,
    Jepoy
Register for webinar
19 posts, 0 answered