View Full Version : Add buttons to HTMLEditor for Ext JS 4
gjsmith66
16 Feb 2012, 6:03 PM
Does anyone have some examples of how to add a button to the HTMLEditor?
mitchellsimoens
17 Feb 2012, 4:48 AM
You would need to create a toolbar and render it to the htmledtior's toolbarWrap element.
This is how it does it internally in 4.0.7, 4.1.0 it's different a little more complicated but inspecting the editor will shed some light:
toolbar = Ext.widget('toolbar', {
renderTo: me.toolbarWrap,
enableOverflow: true,
items: items
});
gjsmith66
17 Feb 2012, 5:44 AM
That is a nice little hint, thanks. But, it sounds like even if I figure out how to do, it will break when 4.1 comes out.
I was hoping someone would have some example code, it seems like a popular request.
Thanks.
ateodorescu
7 Aug 2012, 1:42 AM
That is a nice little hint, thanks. But, it sounds like even if I figure out how to do, it will break when 4.1 comes out.
I was hoping someone would have some example code, it seems like a popular request.
Thanks.
You need to make a plugin for htmleditor like I did here: https://github.com/ateodorescu/mzExt/blob/master/ux/form/plugin/Ext.ux.form.plugin.HtmlEditor.js
Cheers,
Adrian
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.