Spaces between words not in saved text

5 posts, 1 answers
  1. Lynn
    Lynn avatar
    186 posts
    Member since:
    Sep 2006

    Posted 18 Apr 2011 Link to this post

    I'm having a problem with the Editor.  First, it seems to be working just fine, except...

    When I create a large block of text in the Editor and then save that text in a SQL Server table, wherever the text ended a line, there is no blank character at the end of the line.  I've attached a screen capture of the SQL server record and you can see (just above the red arrow) where there is no space between the word 'Homes' and the word 'Online', yet when I take this data out the record and display it on a web page, it displays just fine.

    Here's my issue...after the editor contents are saved in the SQL database, I process the record searching for certain multi-word strings for some special editing issues involved in translation (without going into too much detail).  If I search this stored string for 'Homes Online Network' the instance shown in the attached graphic is never found -- but it displays just fine with a space between the two words.

    Is there some method I can use when retrieving the text field from the SQL database table that will allow my multi-word text search to be successful?

    This is probably some kind of stupid question, but I do need the help.  I've read the Editor documentation and searched the knowledgebase, but haven't found anything obvious that helps me.

    Thanks in advance!

    Lynn
  2. Rumen
    Admin
    Rumen avatar
    13804 posts

    Posted 20 Apr 2011 Link to this post

    Hi Lynn,

    I am not familiar with such a problem and unfortunately I was unable to reproduce it. The blank characters should be saved as <br/> tags in the database. My suggestion is to install the demo examples of RadControls for ASP.NET AJAX and try to reproduce locally the problem using the Save in Database and / or Edit Item Template demos.

    Please, also make sure that you are testing with the latest version of RadControls for ASP.NET AJAX Q1 2011 SP1.

    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.

  3. Lynn
    Lynn avatar
    186 posts
    Member since:
    Sep 2006

    Posted 25 Apr 2011 Link to this post

    Rumen,

    Sorry for the delay in responding to your answer.  I've got too many things going on.

    After more investigation, the problem that is occurring is the presence of "carriage return/line feed" characters.  These characters are being produced when I:

    (1) Open an MS Word 2010 document in native Word format.  This document contains standard text formatting such as bolding, underline, paragraph breaks, etc.

    (2) Select all of the text in the MS Word 2010 document and copy it to the clipboard.

    (3) Paste the copied MS Word doc into a Rad Editor text box on an .aspx web page;  The Editor asks if I want to "cleanse" the Word content and I reply "yes".

    (4) What are these characters?  They are carriage return/line feeds which appear to be created IN ADDITION TO "<p> </p>" structures that are placed in the text by the Editor.

    (5) The contents of the Editor are then inserted into a SQL Server database record column and saved.

    I had to install a copy of UltraEdit to get a hex editor so I could see what was happening.  If you need me to re-create this and try to send it to you, I would need to know how to get some form of text into your site.

    Thanks!

    Lynn
  4. Answer
    Rumen
    Admin
    Rumen avatar
    13804 posts

    Posted 28 Apr 2011 Link to this post

    Hi Lynn,

    Could you please try to strip these "carriage return/line feed" symbols using the solution provided in the following KB article: "\r\n" being added to content when submitted?

    Another suggestion is to disable the IndentHTMLContent content filter. You can see how to do that in this help article: Content Filters, e.g.

    RadEditor1.DisableFilter(Telerik.Web.UI.EditorFilters.IndentHTMLContent);

    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.

  5. Lynn
    Lynn avatar
    186 posts
    Member since:
    Sep 2006

    Posted 30 Apr 2011 Link to this post

    Rumen,

    Thank you for the reply. 

    We have already created our own functionality to strip these unwanted, unneeded, and unasked for special characters from the text.

    We will evaluate the use of the Trim and Replace functionality and the use of the Filters.  I'm not certain that the final answer includes those functions or not without some discussion and testing here.

    I will mark this item as being answered, but I'm not 100% in agreement that this is purely my responsibility to deal with.  I do question the insertion of these extra, special characters by your code.  I kind of think that, with this insertion of characters, you are fixing a problem that some people have and creating one for others (like me).

    Again, thank you for your response.

    Lynn
Back to Top