Ок, почему не работает так?
// Bold
var button = document.createElement("div");
button.className = "button";
button.innerHTML = '<span style="font-weight: bold;">B</span>';
button.title = "Bold";
// button.onclick = function() {
// self.setBold();
// }
button.onclick = this.setBold;
iframeBar.appendChild(button);
Цитата:
|
Event thread: click
Uncaught exception: TypeError: 'this.execute' is not a function
Error thrown at line 15, column 16 in <anonymous function: WYSIWYG.prototype.setBold>() in http://localhost/html/editor/blank.htm:
this.execute("bold", "");
|