Get rid of eval() @ line 676
Now, nicEdit is ready to use in chrome extensions and apps platform :)master
parent
8200365acc
commit
58c71157b1
|
@ -734,7 +734,14 @@ var nicEditorPanel = bkClass.extend({
|
|||
|
||||
addButton : function(buttonName,options,noOrder) {
|
||||
var button = options.buttons[buttonName];
|
||||
var type = (button['type']) ? eval('(typeof('+button['type']+') == "undefined") ? null : '+button['type']+';') : nicEditorButton;
|
||||
var type = null;
|
||||
|
||||
if (button['type']) {
|
||||
type = typeof(window[button['type']]) == undefined ? null : window[button['type']];
|
||||
}
|
||||
else {
|
||||
type = nicEditorButton;
|
||||
}
|
||||
var hasButton = bkLib.inArray(this.buttonList,buttonName);
|
||||
if(type && (hasButton || this.ne.options.fullPanel)) {
|
||||
this.panelButtons.push(new type(this.panelElm,buttonName,options,this.ne));
|
||||
|
|
Loading…
Reference in New Issue