fixed saving code editor without toggling
This commit is contained in:
parent
3a054b4895
commit
b86785faec
1 changed files with 4 additions and 1 deletions
|
|
@ -316,6 +316,9 @@
|
||||||
;
|
;
|
||||||
|
|
||||||
YAHOO.widget.CodeEditor = function (id, cfg) {
|
YAHOO.widget.CodeEditor = function (id, cfg) {
|
||||||
|
// TODO: Make a cfg for off by default
|
||||||
|
this.editorState = "on";
|
||||||
|
|
||||||
// Disable Editor configs that don't apply
|
// Disable Editor configs that don't apply
|
||||||
cfg["animate"] = false;
|
cfg["animate"] = false;
|
||||||
cfg["dompath"] = false;
|
cfg["dompath"] = false;
|
||||||
|
|
@ -399,12 +402,12 @@
|
||||||
|
|
||||||
if ( cfg["toggleButton"] ) {
|
if ( cfg["toggleButton"] ) {
|
||||||
var editor = this;
|
var editor = this;
|
||||||
|
|
||||||
// Add toggle button
|
// Add toggle button
|
||||||
var button = document.createElement("input");
|
var button = document.createElement("input");
|
||||||
|
|
||||||
button.type = "button";
|
button.type = "button";
|
||||||
button.value = "Toggle Editor";
|
button.value = "Toggle Editor";
|
||||||
button.editorState = "on";
|
|
||||||
|
|
||||||
Event.addListener( button, "click", function () {
|
Event.addListener( button, "click", function () {
|
||||||
if ( editor.editorState == "off" ) {
|
if ( editor.editorState == "off" ) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue