telerik editor inserts blank lines on save

2 posts, 0 answers
  1. diane
    diane avatar
    18 posts
    Member since:
    Aug 2014

    Posted 29 Aug 2014 Link to this post

    I would like a telerik tool not to place blank lines between sections of an editor when the user clicks the 'save' button.
    I am new to working with Telerik tools.
    I have an existing VB.net 2010 web application that uses telerik tools. This application has a user interface for the users to edit 'templates'. When you hit the save button on the application, blank lines are automatically inserted between various parts of a 'letter' that is being generated.

    When the editor is being used, there are tabs for preview, html, and design.

    I have gone into the 'html' editor to remove the extra <br></br> tags. However the same tags keep appearing. Thus I am wondering if you can tell me what I can do to keep the blank lines from appearing?

    To help me, I thought I would show you some code that is being used so you can see where the telerik tool is being accessed;
    ​Imports System.Data
    Imports System.Reflection
    Imports System.Windows.Forms
    Imports Telerik.Web.UIImports System.Web.Script.Services
    Imports System.Web.Script.Serialization
    Imports System.Web.Services
    Partial Class edittemplates_default
        Inherits System.Web.UI.Page    Protected _master As MasterPage#Region "Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load"
        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load        _master = CType(Page.Master, MasterPage)
            _master.PageTitle = "Edit Templates"        If Not Page.IsPostBack Then
                If (SiteUserManager.SessionUser IsNot Nothing) Then                LoadTemplates()             
                    LoadVariables()
                 
                Else                'pnlEditor.Enabled = False
                    'pnlEditor.Visible = False            End If
            End If        Master.Page.Title = "Login"    End Sub
    #End Region#Region "Protected Sub LoadTemplates()"
        Protected Sub LoadTemplates()
            Dim et As EditTemplates = New EditTemplates()
            Dim dt As DataTable = et.SelectTemplates()        For i = 0 To dt.Rows.Count() - 1
                ddlTemplates.Items.Add(New ListItem(dt.Rows(i)(dt.Columns(1).ColumnName()), dt.Rows(i)(dt.Columns(0).ColumnName())))
            Next    End Sub
    #End Region
    #Region "Protected Sub LoadVariables()"
        Protected Sub LoadVariables()
            Dim et As EditTemplates = New EditTemplates()
            Dim dt As DataTable = et.SelectAtnLtrVariables()        For i = 0 To dt.Rows.Count() - 1
                rlbVariables.Items.Add(New RadListBoxItem(dt.Rows(i)(dt.Columns(1).ColumnName()), dt.Rows(i)(dt.Columns(0).ColumnName())))
            Next    End Sub
    #End Region
    #Region "Protected Sub btnSaveTemplate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSaveTemplate.Click"
        Protected Sub btnSaveTemplate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSaveTemplate.Click
            Dim et As EditTemplates = New EditTemplates()
            If ddlTemplates.SelectedValue <> 0 Then
                et.UpdateTemplate(ddlTemplates.SelectedValue, ddlLanguage.SelectedValue, rEditor.Content.ToString())
            End If
        End Sub
    #End Region
  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 02 Sep 2014 Link to this post

    Hi Diane,

    It is expected the two blank lines to appear if there are such BR tags in the content.

    This two tags - <br></br> are incorrect and being transformed to two proper BR tags. Note that the BR tag should be only self-closing tags.

    Could you please provide more details how these tags appear in the content and what the exact steps for their appearance? Can you reproduce this behavior in one of the Telerik online demos?

    Any further details will be helpful to examine this behavior as locally I am unable to define what exactly is the reason for the behavior encountered on your end.

    Regards,
    Ianko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top