/* jQWidgets v3.4.0 (2014-June-23) Copyright (c) 2011-2014 jQWidgets. License: http://jqwidgets.com/license/ */ (function(c) { $.jqx.jqxWidget("jqxEditor", "", {}); $.extend($.jqx._jqxEditor.prototype, { defineInstance: function() { this.width = null; this.height = null; this.disabled = false; this.pasteMode = "html"; this.editable = true; this.lineBreak = "default"; this.toolbarPosition = "top"; this.commands = { bold: { tooltip: "Bold", command: "bold", type: "toggleButton" }, italic: { tooltip: "Italic", command: "italic", type: "toggleButton" }, underline: { tooltip: "Underline", command: "underline", type: "toggleButton" }, format: { placeHolder: "Format Block", tooltip: "Format Block", command: "formatblock", value: [{ value: "p", label: "Paragraph" }, { value: "h1", label: "Header 1" }, { value: "h2", label: "Header 2" }, { value: "h3", label: "Header 3" }, { value: "h4", label: "Header 4" }], type: "list", width: 120, dropDownWidth: 190, height: 25 }, font: { placeHolder: "Font", tooltip: "Font Name", command: "fontname", value: [{ label: "Arial", value: "Arial, Helvetica, sans-serif" }, { label: "Comic Sans MS", value: '"Comic Sans MS", cursive, sans-serif' }, { label: "Courier New", value: '"Courier New", Courier, monospace' }, { label: "Georgia", value: "Georgia,serif" }, { label: "Impact", value: "Impact,Charcoal,sans-serif" }, { label: "Lucida Console", value: "'Lucida Console',Monaco,monospace" }, { label: "Tahoma", value: "Tahoma,Geneva,sans-serif" }, { label: "Times New Roman", value: "'Times New Roman',Times,serif" }, { label: "Trebuchet MS", value: '"Trebuchet MS",Helvetica,sans-serif' }, { label: "Verdana", value: "Verdana,Geneva,sans-serif" }], type: "list", width: 160, height: 25, dropDownWidth: 160 }, size: { placeHolder: "Size", tooltip: "Font Size", command: "fontsize", value: [{ label: "1 (8pt)", value: "xx-small" }, { label: "2 (10pt)", value: "x-small" }, { label: "3 (12pt)", value: "small" }, { label: "4 (14pt)", value: "medium" }, { label: "5 (18pt)", value: "large" }, { label: "6 (24pt)", value: "x-large" }, { label: "7 (36pt)", value: "xx-large" }], type: "list", width: 45, height: 25, dropDownWidth: 160 }, color: { tooltip: "Text Color", command: "forecolor", value: "#000", type: "colorPicker" }, background: { tooltip: "Fill Color", command: "backcolor", value: "#fff", type: "colorPicker" }, left: { tooltip: "Align Left", command: "justifyleft", type: "toggleButton" }, center: { tooltip: "Align Center", command: "justifycenter", type: "toggleButton" }, right: { tooltip: "Align Right", command: "justifyright", type: "toggleButton" }, outdent: { tooltip: "Indent Less", command: "outdent", type: "button" }, indent: { tooltip: "Indent More", command: "indent", type: "button" }, ul: { tooltip: "Insert unordered list", command: "insertunorderedlist", type: "toggleButton" }, ol: { tooltip: "Insert ordered list", command: "insertorderedlist", type: "toggleButton" }, image: { tooltip: "Insert image", command: "insertimage", type: "button" }, link: { tooltip: "Insert link", command: "createlink", type: "toggleButton" }, html: { tooltip: "View source", command: "viewsource", type: "toggleButton" }, clean: { tooltip: "Remove Formatting", command: "removeformat", type: "button" } }; this.createCommand = null; this.defaultLocalization = { bold: "Bold", italic: "Italic", underline: "Underline", format: "Format Block", font: "Font Name", size: "Font Size", color: "Text Color", background: "Fill Color", left: "Align Left", center: "Align Center", right: "Align Right", outdent: "Indent Less", indent: "Indent More", ul: "Insert unordered list", ol: "Insert ordered list", image: "Insert image", link: "Insert link", html: "View source", clean: "Remove Formatting", Remove: "Remove", Ok: "Ok", Cancel: "Cancel", Change: "Change", "Go to link": "Go to link", "Open in a new window/tab": "Open in a new window/tab", Align: "Align", VSpace: "VSpace", HSpace: "HSpace", Width: "Width", Height: "Height", Title: "Title", URL: "URL", "Insert Image": "Insert Image", "Insert Link": "Insert Link", "Alt Text": "Alt Text", "not set": "<not set>", Left: "Left", Right: "Right", Paragraph: "Paragraph", Header: "Header", Arial: "Arial", "Comic Sans MS": "Comic Sans MS", "Courier New": "Courier New", Georgia: "Georgia", Impact: "Impact", "Lucida Console": "Lucida Console", Tahoma: "Tahoma", "Times New Roman": "Times New Roman", "Trebuchet MS": "Trebuchet MS", Verdana: "Verdana" }; this.localization = this.defaultLocalization; this.tools = "bold italic underline | format font size | color background | left center right | outdent indent | ul ol | image | link | clean | html"; this.readOnly = false; this.stylesheets = new Array(); this.rtl = false; this.colorPickerTemplate = '
'; this.touchMode = false; this.events = ["change"] }, createInstance: function(k) { var g = this; this.textArea = this.host; var o = this.host.attr("contenteditable"); this.host.addClass(this.toThemeProperty("jqx-widget")); if (o == true || o == "true") { this.inline = true; this.widget = this.host; this.editorDocument = document; this.selection = new b(this.editorDocument); var n = $("