"]
],
useCSS: false,
docType: '',
docCSSFile: "",
bodyStyle: "margin:4px; font:10pt Arial,Verdana; cursor:text"
},
buttons: {
init: "bold,,|italic,,|underline,,|strikethrough,,|subscript,,|superscript,,|font,,fontname,|size,Font Size,fontsize,|style,,formatblock,|color,Font Color,forecolor,|highlight,Text Highlight Color,hilitecolor,color|removeformat,Remove Formatting,|bullets,,insertunorderedlist|numbering,,insertorderedlist|outdent,,|indent,,|alignleft,Align Text Left,justifyleft|center,,justifycenter|alignright,Align Text Right,justifyright|justify,,justifyfull|undo,,|redo,,|rule,Insert Horizontal Rule,inserthorizontalrule|image,Insert Image,insertimage,url|link,Insert Hyperlink,createlink,url|unlink,Remove Hyperlink,|cut,,|copy,,|paste,,|pastetext,Paste as Text,inserthtml,|print,,|source,Show Source"
},
imagesPath: function () {
return U()
}
};
e.fn.cleditor = function (a) {
var b = e([]);
this.each(function (c, d) {
if (d.tagName == "TEXTAREA") {
var h = e.data(d, Y);
h || (h = new cleditor(d, a));
b = b.add(h)
}
});
return b
};
var H = "backgroundColor",
A = "button",
x = "buttonName",
F = "change",
Y = "cleditor",
q = "click",
n = "disabled",
m = "
",
I = "unselectable",
W = "cleditorButton",
X = "cleditorDisabled",
ca = "cleditorPopup",
S = "cleditorList",
da = "cleditorColor",
B = "cleditorPrompt",
fa = "cleditorMsg",
l = e.browser.msie,
ea = /msie\s6/i.test(navigator.userAgent),
L = /iphone|ipad|ipod/i.test(navigator.userAgent),
p = {}, Z, s = e.cleditor.buttons;
e.each(s.init.split("|"), function (a, b) {
var c = b.split(","),
d = c[0];
s[d] = {
stripIndex: a,
name: d,
title: c[1] === "" ? d.charAt(0).toUpperCase() + d.substr(1) : c[1],
command: c[2] === "" ? d : c[2],
popupName: c[3] === "" ? d : c[3]
}
});
delete s.init;
cleditor = function (a, b) {
var c = this;
c.options = b = e.extend({}, e.cleditor.defaultOptions, b);
var d = c.$area = e(a).hide().data(Y, c).blur(function () {
E(c, true)
}),
h = c.$main = e(m).addClass("cleditorMain").width(b.width).height(b.height),
f = c.$toolbar = e(m).addClass("cleditorToolbar").appendTo(h),
i = e(m).addClass("cleditorGroup").appendTo(f);
e.each(b.controls.split(" "), function (g, j) {
if (j === "") return true;
if (j == "|") {
e(m).addClass("cleditorDivider").appendTo(i);
i = e(m).addClass("cleditorGroup").appendTo(f)
} else {
var k = s[j],
o = e(m).data(x, k.name).addClass(W).attr("title", k.title).bind(q, e.proxy(aa, c)).appendTo(i).hover(O, P),
G = {};
if (k.css) G = k.css;
else if (k.image) G.backgroundImage = "url(" + U() + k.image + ")";
if (k.stripIndex) G.backgroundPosition =
k.stripIndex * -24;
o.css(G);
l && o.attr(I, "on");
k.popupName && R(k.popupName, b, k.popupClass, k.popupContent, k.popupHover)
}
});
h.insertBefore(d).append(d);
if (!Z) {
e(document).click(function (g) {
g = e(g.target);
g.add(g.parents()).is("." + B) || r()
});
Z = true
}
/auto|%/.test("" + b.width + b.height) && e(window).resize(function () {
K(c)
});
K(c)
};
var $ = cleditor.prototype;
e.each([
["clear", function (a) {
a.$area.val("");
E(a)
}
],
["disable", T],
["execCommand", v],
["focus", w],
["hidePopups", r],
["sourceMode", t, true],
["refresh", K],
["select", function (a) {
setTimeout(function () {
t(a) ? a.$area.select() : v(a, "selectall")
}, 0)
}
],
["selectedHTML", function (a) {
D(a);
a = y(a);
if (l) return a.htmlText;
var b = e("")[0];
b.appendChild(a.cloneContents());
return b.innerHTML
},
true
],
["selectedText", M, true],
["showMessage", z],
["updateFrame", E],
["updateTextArea", V]
], function (a, b) {
$[b[0]] = function () {
for (var c = [this], d = 0; d < arguments.length; d++) c.push(arguments[d]);
c = b[1].apply(this, c);
if (b[2]) return c;
return this
}
});
$.change = function (a) {
var b = e(this);
return a ? b.bind(F,
a) : b.trigger(F)
}
})(jQuery);