This is a migrated thread and some comments may be shown as answers.

telerik editor inserts blank lines on save

1 Answer 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
diane
Top achievements
Rank 1
diane asked on 29 Aug 2014, 05:24 PM
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

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 02 Sep 2014, 06:22 AM
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.

 
Tags
General Discussions
Asked by
diane
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or