2013년 10월 17일 목요일

Rich editing with an HTML field

1. Initialize the QuickTipManager:
Ext.tip.QuickTipManager.init();

2. Create a narrow form panel and add an HtmlEditor field to the panel's
items collection:
var formPanelNarrow = Ext.create('Ext.form.Panel', {
title: 'HTML Editor (narrow)',
width: 350,
height: 200,
layout: 'fit',
items: [{
xtype: 'htmleditor'
}],
renderTo: Ext.getBody()
});

3. Create a second form panel with the HtmlEditor but this time set the width
to 600:
var formPanelWide = Ext.create('Ext.form.Panel', {
title: 'HTML Editor (wide)',
width: 600,
height: 200,
layout: 'fit',
items: [{
xtype: 'htmleditor'
}],
renderTo: Ext.getBody()
});
4. Create a third form panel with an HTML editor but customize the toolbar options
as follows:
var formPanelCustomOptions = Ext.create('Ext.form.Panel', {
title: 'HTML Editor (customising the toolbar)',
width: 600,
height: 200,
layout: 'fit',
items: [{
xtype: 'htmleditor',
enableSourceEdit: false,
enableColors: false,
enableLinks: false,
fontFamilies: ["Arial", "Tahoma", "Verdana"]
}],
renderTo: Ext.getBody()
});


댓글 없음:

댓글 쓰기