Class: Plugin

ParseTablePlugin~ Plugin

(private) new Plugin()

Source:

Methods

(private) fixOverlayZindex(dialog)

Walks through parent elements looking for max z-index. Then sets z-index of dialog argument to be at the top of all parents.
Parameters:
Name Type Description
dialog Dialog
Source:

(private) init()

Adds click event handler to target element -- to call ParseTablePlugin~Plugin#showPasteDialog If ParseTablePlugin~Settings#openOnPageLoad is set to true then adds another handler on $(document).ready -- same action
Source:

(private) parseHTMLTable(content) → {Array.<Array.<Array.<(string|number)>>>}

Parses HTML looking for and cleaning all the formatting rubbish
Parameters:
Name Type Description
content string HTML as pasted to WYSIWYG CONTENTEDITABLE iframe
Source:
Returns:
array of found tables, each table is array of found rows, each row is array of cell values - either string or number
Type
Array.<Array.<Array.<(string|number)>>>

(private) parseTable(contents, dialog)

Parses table using ParseTablePlugin~Plugin#parseHTMLTable function and shows confirmation dialog
Parameters:
Name Type Description
contents string HTML of WYSIWYG CONTENTEDITABLE iframe
dialog Dialog existing dialog.
Source:

(private) showPasteDialog(contentopt, messageopt)

Shows paste dialog (dialog with textarea)
Parameters:
Name Type Attributes Description
content string <optional>
Some HTML content to show in textarea This is used when user clicks "Cancel" button on confirmation dialog, or when table can not be parsed
message string <optional>
Text for red message on paste dialog (error message)
Source: