var defaultToolbar = "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | " +
"bullist numlist outdent indent | link image";
- function createToolbar(items) {
+ function createToolbar(items, size) {
var toolbarItems = [], buttonGroup;
if (!items) {
buttonGroup = null;
} else {
if (Factory.has(item)) {
- item = {type: item};
-
- if (settings.toolbar_items_size) {
- item.size = settings.toolbar_items_size;
- }
-
+ item = {type: item, size: size};
toolbarItems.push(item);
buttonGroup = null;
} else {
}
item.type = item.type || 'button';
-
- if (settings.toolbar_items_size) {
- item.size = settings.toolbar_items_size;
- }
+ item.size = size;
item = Factory.create(item);
buttonGroup.items.push(item);
/**
* Creates the toolbars from config and returns a toolbar array.
*
+ * @param {String} size Optional toolbar item size.
* @return {Array} Array with toolbars.
*/
- function createToolbars() {
+ function createToolbars(size) {
var toolbars = [];
function addToolbar(items) {
if (items) {
- toolbars.push(createToolbar(items));
+ toolbars.push(createToolbar(items, size));
return true;
}
}
border: 1,
items: [
settings.menubar === false ? null : {type: 'menubar', border: '0 0 1 0', items: createMenuButtons()},
- createToolbars()
+ createToolbars(settings.toolbar_items_size)
]
});
border: 1,
items: [
settings.menubar === false ? null : {type: 'menubar', border: '0 0 1 0', items: createMenuButtons()},
- createToolbars(),
+ createToolbars(settings.toolbar_items_size),
{type: 'panel', name: 'iframe', layout: 'stack', classes: 'edit-area', html: '', border: '1 0 0 0'}
]
});