Tags

PerlDoc

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview


internal package Foswiki::Plugins::WysiwygPlugin::HTML2TML::Node;

Object for storing a parsed HTML tag, and processing it to generate TML from the parse tree.

See also Foswiki::Plugins::WysiwygPlugin::HTML2TML::Leaf

ObjectMethod new( $context, $tag, \%attrs )

Construct a new HTML tag node using the given tag name and attribute hash.

ObjectMethod addChild( $node )

Add a child node to the ordered list of children of this node

ObjectMethod rootGenerate($opts) → $text

Generates TML from this HTML node. The generation is done top down and bottom up, so that higher level nodes can make decisions on whether to allow TML conversion in lower nodes, and lower level nodes can constrain conversion in higher level nodes.

$opts is a bitset. WC::VERY_CLEAN will cause the generator to drop unrecognised HTML (e.g. divs and spans that don't generate TML)

Topic revision: r1 - 24 Jun 2022, ProjectContributor
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding CLASSE Wiki? Send feedback