Replace the current paragraphwidget with an enhanced version of the textwidget
The new textwidget should have 3 working modes:
- text: prints its content just as they are, but replacing all html entities
- bbcode: standard bbcode parsing
- html: prints plain html
Blueprint information
Related branches
Sprints
Whiteboard
New properties of the TextWidget:
$working_mode: Defines the way the TextWidget behaves. Can have 3 possible values defined as constants in compinit.php:
- TextW_TEXT_MODE: Prints the content just as it is, replacing all HTML entities.
- TextW_BBCODE_MODE: Parses the text for BBCode.
- TextW_HTML_MODE: Prints the content without modifications, but parses for closed tag AECode.
$ID: Functionality inherited from the widget class.
$STYLES: Array will contain information about all possible internal elements of a paragraph, including the paragraph by itself. The styling method will work on a double basis:
- Default styling for the wrapping div. (NOTE: When in BBCODE mode, the default styling is applied to paragraphs inside of the wrapping div, and not the div by itself.) The function used for this is addAttribute($name, $value), which modifies the widget as a whole.
- Styling of all additional components and component groups. For this to be done, one has to create a stylesheet for all subcomponents with the function addAditionalSty
Example of all this:
$Widget = new TextWidget(
$Widget-
$Widget-
$index = $Widget-
$Widget-
Work Items
Dependency tree
* Blueprints in grey have been implemented.