/* * This file has been commented to support Visual Studio Intellisense. * You should not use this file at runtime inside the browser--it is only * intended to be used only for design-time IntelliSense. Please use the * standard jHtmlArea library for all production use. */ /* * 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(options) { /// /// 1: (options) - Convert all TextArea DOM Elements to be displayed as jHtmlArea WYSIWYG Editors. /// 2: (string, arguments) - This function accepts a string containing the method name that you want to execute against the jHtmlArea object. /// /// /// 1: options - The custom options you want applied to the jHtmlArea's that are created. /// 2: string - The name of the jHtmlArea object method to be executed. The results of the method call are then returned instead of the jQuery object. /// }; var jHtmlArea = window.jHtmlArea = function(elem, options) { /// /// Converts the passed in TextArea DOM Element to a jHtmlArea WYSIWYG Editor. /// /// /// The TextArea DOM Element to be converted to a jHtmlArea WYSIWYG Editor. Required. /// /// /// The custom options you want applied to the jHtmlArea that is created. Optional. /// /// /// The Default Options that are used for configuring the jHtmlArea WYSIWYG Editor upon creation. /// /// }; jHtmlArea.fn = jHtmlArea.prototype = { // The current version of jHtmlArea being used jhtmlarea: "0.7.0", init: function(elem, options) { /// /// Converts the passed in TextArea DOM Element to a jHtmlArea WYSIWYG Editor. /// /// /// Required. The TextArea DOM Element to be converted to a jHtmlArea WYSIWYG Editor. /// /// /// Optional. The custom options you want applied to the jHtmlArea that is created. /// /// }, execCommand: function(a, b, c) { /// /// Executes a command on the current document, current selection, or the given range. /// /// /// Required. String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script. /// /// /// Optional. Boolean that specifies one of the following values: /// "false" = Default. Do not display a user interface. Must be combined with vValue, if the command requires a value. /// "true" = Display a user interface if the command supports one. /// /// /// Optional. Variant that specifies the string, number, or other value to assign. Possible values depend on the command. /// }, ec: function(a, b, c) { /// /// Executes a command on the current document, current selection, or the given range. An alias for the "execCommand" method. /// /// /// Required. String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script. /// /// /// Optional. Boolean that specifies one of the following values: /// "false" = Default. Do not display a user interface. Must be combined with vValue, if the command requires a value. /// "true" = Display a user interface if the command supports one. /// /// /// Optional. Variant that specifies the string, number, or other value to assign. Possible values depend on the command. /// }, queryCommandValue: function(a) { /// /// Returns the current value of the document, range, or current selection for the given command. /// /// /// Required. String that specifies a command identifier. /// /// }, qc: function(a) { /// /// Returns the current value of the document, range, or current selection for the given command. An alias for the "queryCommandValue" method. /// /// /// Required. String that specifies a command identifier. /// /// }, getSelectedHTML: function() { /// /// Returns the HTML that is currently selected within the editor. /// /// }, getSelection: function() { /// /// Returns the Browser Selection object that represents the currently selected region of the editor. /// /// }, getRange: function() { /// /// Returns the Browser Range object that represents the currently selected region of the editor. (This uses the "getSelection" method internally.) /// /// }, pasteHTML: function(html) { /// /// Pastes HTML text into the editor, replacing any currently selected text and HTML elements. /// /// /// The HTML text to paste/insert. /// }, cut: function() { /// /// Copies the current selection to the clipboard and then deletes it. /// }, copy: function() { /// /// Copies the current selection to the clipboard. /// }, paste: function() { /// /// Overwrites the contents of the clipboard on the current selection. /// }, bold: function() { /// /// Toggles the current selection between bold and nonbold. /// }, italic: function() { /// /// Toggles the current selection between italic and nonitalic. /// }, underline: function() { /// /// Toggles the current selection between underlined and not underlined. /// }, strikeThrough: function() { /// /// If there is a selection and all of the characters are already striked, the strikethrough will be removed. Otherwise, all selected characters will have a line drawn through them. /// }, image: function(url) { /// /// This command will insert an image (referenced by url) at the insertion point. /// If no URL is specified, a prompt will be displayed to the user. /// /// /// The URL to the Image to be inserted. If no URL is specified, a prompt will be shown. /// }, removeFormat: function() { /// /// Removes the formatting tags from the current selection. /// }, link: function() { /// /// Inserts a hyperlink on the current selection, or displays a dialog box enabling the user to specify a URL to insert as a hyperlink on the current selection. /// }, unlink: function() { /// /// Removes any hyperlink from the current selection. /// }, orderedList: function() { /// /// Converts the text selection into an ordered list. /// }, unorderedList: function() { /// /// Converts the text selection into an unordered list. /// }, superscript: function() { /// /// If there is a selection and all of the characters are already superscripted, the superscript will be removed. Otherwise, all selected characters will be drawn slightly higher than normal text. /// }, subscript: function() { /// /// If there is a selection and all of the characters are already subscripted, the subscript will be removed. Otherwise, all selected characters will be drawn slightly lower than normal text. /// }, p: function() { /// /// Sets the current block format tag to

. ///

}, h1: function() { /// /// Sets the current block format tag to

. ///

}, h2: function() { /// /// Sets the current block format tag to

. ///

}, h3: function() { /// /// Sets the current block format tag to

. ///

}, h4: function() { /// /// Sets the current block format tag to

. ///

}, h5: function() { /// /// Sets the current block format tag to
. ///
}, h6: function() { /// /// Sets the current block format tag to
. ///
}, heading: function(h) { /// /// Sets the current block format tag to tag. /// Example: Calling jHtmlArea.heading(2) will be the same as calling jHtmlArea.h2() /// /// /// The Number of Header () tag to format the current block with. /// For Example: Passing a 2 or "2" will cause the current block to be formatted with a

tag. /// }, indent: function() { /// /// Indents the selection or insertion point. /// }, outdent: function() { /// /// Outdents the selection or insertion point. /// }, insertHorizontalRule: function() { /// /// Inserts a horizontal rule at the insertion point (deletes selection). /// }, justifyLeft: function() { /// /// Justifies the selection or insertion point to the left. /// }, justifyCenter: function() { /// /// Centers the selection or insertion point. /// }, justifyRight: function() { /// /// Right-justifies the selection or the insertion point. /// }, increaseFontSize: function() { /// /// Increases the Font Size around the selection or at the insertion point. /// }, decreaseFontSize: function() { /// /// Decreases the Font Size around the selection or at the insertion point. /// }, forecolor: function(c) { /// /// Changes a font color for the selection or at the insertion point. Requires a color value string to be passed in as a value argument. /// }, formatBlock: function(v) { /// /// Sets the current block format tag. /// }, showHTMLView: function() { /// /// Shows the HTML/Source View (TextArea DOM Element) within the Editor and hides the WYSIWYG interface. /// }, hideHTMLView: function() { /// /// Hides the HTML/Source View (TextArea DOM Element) within the Editor and displays the WYSIWYG interface. /// }, toggleHTMLView: function() { /// /// Toggles between HTML/Source View (TextArea DOM Element) and the WYSIWYG interface within the Editor. /// }, toHtmlString: function() { /// /// Returns the HTML text contained within the editor. /// /// }, toString: function() { /// /// Return the Text contained within the editor, with all HTML tags removed. /// /// }, updateTextArea: function() { /// /// Forces the TextArea DOM Element to by sync'd with the contents of the HTML WYSIWYG Editor. /// }, updateHtmlArea: function() { /// /// Forces the HTML WYSIWYG Editor to be sync'd with the contents of the TextArea DOM Element. /// } }; jHtmlArea.fn.init.prototype = jHtmlArea.fn; })(jQuery);