internal package
Foswiki::Plugins::EditTablePlugin::Core Work in progress: changing the table based on form parameters
(sub handleTableChangeParams)
Test in topic:
%EDITTABLE{}%AAA |
---|
Initializes variables.
Init variables again. If called from INCLUDE this is the first time we init
StaticMethod parseTables($text, $topic, $web)Read and parse table data once for each topic. Stores data in hash $tableMatrix{webname}{topicname}. Even if we are just viewing table data (not editing), we can deal with text inside edit tables in a special way. For instance by calling handleTmlInTables on the table text.
Called from commonTagsHandler. Pass over to processText in 'no Save' mode.
NOT FULLY IMPLEMENTED YET
Change table by means of parameters:Handles button interaction; for each state updates the $mode to a value of $MODE.
StaticMethod addRows( $tableStats, $tableChanges, $position, $count )Adds one or more rows.
StaticMethod deleteRows( $tableStats, $tableChanges, $position, $count )Deletes one or more rows.
StaticMethod processTableData( $tableNr, $editTableData, $tableChanges, $doEdit, $doSave, $web, $topic ) → (\@processedText, \%tableChanges) StaticMethod getPreferencesValues()Read preferences from plugin topic of preferences.
StaticMethod extractParams( $arguments, \%params )Creates the HTML for the start of the table.
digestedCellValue: properly handle labels whose result may have been moved around by javascript, and therefore no longer correspond to the raw saved table text.
Add one space to both sides of the text to allow TML expansion. Convert multiple (existing) spaces to one space.
stripCommentsFromRegex($pattern) → $pattern
For debugging: removes all spaces and comments from a regular expression.
StaticMethod _handleSpreadsheetFormula( $text ) → $text Replaces a SpreadSheetPlugin formula by a static text. StaticMethod handleTmlInTables( \@lines ) Users using the plugin would be confused when they enter newlines, which get replaced withSo that:
*bold* _italic_ |
gets rendered as:
bold italic |
Reads the headerrows and footerrows parameters from the TABLE macro (if any) and returns them as tuple.
If no TABLE tag is present, returns (0,0).