/* * jHtmlArea 0.7.0 - WYSIWYG Html Editor jQuery Plugin * Copyright (c) 2009 Chris Pietschmann * http://jhtmlarea.codeplex.com * Licensed under the Microsoft Reciprocal License (Ms-RL) * http://jhtmlarea.codeplex.com/license */ (function($) { $.fn.htmlarea = function(opts) { if (opts && typeof (opts) === "string") { var args = []; for (var i = 1; i < arguments.length; i++) { args.push(arguments[i]); } var htmlarea = jHtmlArea(this[0]); var f = htmlarea[opts]; if (f) { return f.apply(htmlarea, args); } } return this.each(function() { jHtmlArea(this, opts); }); }; var jHtmlArea = window.jHtmlArea = function(elem, options) { if (elem.jquery) { return jHtmlArea(elem[0]); } if (elem.jhtmlareaObject) { return elem.jhtmlareaObject; } else { return new jHtmlArea.fn.init(elem, options); } }; jHtmlArea.fn = jHtmlArea.prototype = { // The current version of jHtmlArea being used jhtmlarea: "0.7.0", init: function(elem, options) { if (elem.nodeName.toLowerCase() === "textarea") { var opts = $.extend({}, jHtmlArea.defaultOptions, options); elem.jhtmlareaObject = this; var textarea = this.textarea = $(elem); var container = this.container = $("
").addClass("jHtmlArea").width(textarea.width()).insertAfter(textarea); var toolbar = this.toolbar = $("
").addClass("ToolBar").appendTo(container); priv.initToolBar.call(this, opts); var iframe = this.iframe = $("