Changeset 4295 for trunk/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin.pm
- Timestamp:
- 06/24/09 21:13:57 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin.pm
r4144 r4295 551 551 =pod 552 552 553 ---++ FunctionaddXMLTag($tag, \&fn)553 ---++ StaticMethod addXMLTag($tag, \&fn) 554 554 555 555 Instruct WysiwygPlugin to "lift out" the named tag 556 556 and pass it to &fn for processing. 557 557 &fn may modify the text of the tag. 558 &fn should return 0 i sthe tag is to be re-embedded immediately,558 &fn should return 0 if the tag is to be re-embedded immediately, 559 559 or 1 if it is to be re-embedded after all processing is complete. 560 560 The text passed (by reference) to &fn includes the 561 561 =<tag> ... </tag>= brackets. 562 563 The simplest use of this function is something like this: 564 =Foswiki::Plugins::WysiwygPlugin::addXMLTag( 'mytag', sub { 1 } );= 562 565 563 566 A plugin may call this function more than once … … 565 568 However, only the *original plugin* may change the processing 566 569 for a tag. 570 571 Plugins should call this function from their =initPlugin= 572 handlers so that WysiwygPlugin will protect the XML-like tags 573 for all conversions, including REST conversions. 574 Plugins that are intended to be used with older versions of Foswiki 575 (e.g. 1.0.6) should check that this function is defined before calling it, 576 so that they degrade gracefully if an older version of WysiwygPlugin 577 (e.g. that shipped with 1.0.6) is installed. 567 578 568 579 =cut
Note: See TracChangeset
for help on using the changeset viewer.
