View Full Version : Extjs4 Html Editor

22 Aug 2012, 4:45 AM
Hi All,

I am using Extjs4 Html Editor as Mail Signature Screen.
From which I am saving the signatures to db and every thing is working fine.
The problem is when I am inserting multiline data is not getting save. and when I am hitting an enter key to go for next line data is not getting saved. but when I am hitting spaces to go for next line then the data is getting saved.

Here is my script.....

SignatureForm.FormTutorial = {
init: function (cmp) {

var addUserForm = Ext4.create('Ext4.form.Panel', {
title: 'Signature Form',
renderTo: 'SignatureForm',
width: 500,
height: 300,
url: '/EmailConfiguration/AddSignature',
// defaults: { xtype: 'textfield' },
// bodyStyle: 'padding: 10px',
bodyPadding: 30,
//closable: true,

items: [
{xtype: 'htmleditor', name: 'SignatureText', defaultValue: 'Thanks and Regards', multiline: true, submitValue: true, layout: 'fit'}],
buttons: [{
text: 'Add',
handler: function () {
success: function (a, b) {
Ext.Msg.alert('Success', 'ok');
failure: function (a, b) {
Ext.Msg.alert('Failure', '');
text: 'Reset',
handler: function () {



Ext4.onReady(SignatureForm.FormTutorial.init, SignatureForm.FormTutorial);

It would be a great help if any one of you could help me out in this...

Thanks in Advance.....:)

22 Aug 2012, 6:03 AM
In HTML, Carriage Returns/line feeds are meaningless, so the component automatically strips them out. Space characters however have an HTML analog of " ", which the editor preserves.

In short, HTML formatting must be done via appropriate HTML tags (keeping CSS in mind, of course).

22 Aug 2012, 9:22 PM
Thanks for your Immediate response.

Actually I am new to the Extjs and HTML.
Could you please explain in briefly how to resolve this issue...