PDA

View Full Version : [CLOSED] Html editor is not working properly.



speedstepmem4
Sep 30, 2014, 10:46 AM
Hi,



<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<ext:ResourceManager ID="ScriptManager1" runat="server" Namespace="Sample"></ext:ResourceManager>
<ext:Viewport runat="server" Layout="FitLayout">
<Content>
<ext:Container runat="server" Layout="BorderLayout">
<Content>
<ext:Panel runat="server" ID="Panel1" Height="200" Region="North">
<Items>
<ext:HtmlEditor runat="server" Width="800"></ext:HtmlEditor>
</Items>
</ext:Panel>
</Content>
</ext:Container>
</Content>
</ext:Viewport>
</div>
</form>
</body>
</html>



Steps to reproduce:
Type something inside the html editor and press ENTER

The first line that we typed comes down and also an empty line is inserted after this line.

Please guide us to make the alignment properly in an HTML editor.

Note: Refer the attached screenshot.

Vladimir
Sep 30, 2014, 11:54 AM
Hi

HtmlEditor depends from browser because it is just element is marked as contenteditable="on" (https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_Editable)
So, the html editor behaviour is totally under browser control, we cannot change that behaviour

I guess that your browser wrap line by <p> tag therefore you see that empty lines. You can try to press Shift+Enter instead Enter to prevent it but as I say the behaviour is totally under browser control therefore it can be different in different browsers