Permalink
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (15 sloc) 449 Bytes
$(function(){
var area = null;
var update = function(){
var isHtml = $("#format option:selected").text() == "HTML";
if (isHtml == !!area) {
} else if (area) {
area.removeInstance("contentarea");
area = null;
} else {
area = new nicEditor({fullPanel: true}).panelInstance("contentarea", {hasPanel: true});
}
};
update();
$("#format").change(update);
});