$texy = new Texy();
$html = $texy->process($text);
Show file
Open project: dg/texy
Class Usage Examples
Property | Type | Description | |
---|---|---|---|
$_classes | for internal usage | ||
$_styles | for internal usage | ||
$alignClasses | CSS classes for align modifiers | ||
$allowed | Texy! syntax configuration | ||
$allowedClasses | Allowed classes | ||
$allowedStyles | Allowed inline CSS style | ||
$allowedTags | Allowed HTML tags | ||
$blockModule | |||
$blockQuoteModule | |||
$dtd | array | $dtd[element][0] - allowed attributes (as array keys) $dtd[element][1] - allowed content for an element (content model) (as array keys) - array of allowed elements (as keys) - FALSE - empty element - 0 - special case for ins & del | |
$emoticonModule | |||
$figureModule | |||
$headingModule | |||
$horizLineModule | |||
$htmlModule | |||
$htmlOutputModule | |||
$imageModule | |||
$linkModule | |||
$listModule | |||
$longWordsModule | |||
$mergeLines | Paragraph merging mode | ||
$nontextParagraph | string | ||
$obfuscateEmail | Do obfuscate e-mail addresses? | ||
$paragraphModule | |||
$phraseModule | |||
$removeSoftHyphens | remove soft hyphens (SHY)? | ||
$scriptModule | |||
$styleSheet | Generated stylesheet | ||
$summary | Parsing summary | ||
$tabWidth | TAB width (for converting tabs to spaces) | ||
$tableModule | |||
$typographyModule | |||
$urlSchemeFilters | regexps to check URL schemes |
Method | Description | |
---|---|---|
__clone ( ) | ||
__construct ( ) | ||
addHandler ( $event, $callback ) : void | Add new event handler. | |
checkURL ( $URL, $type ) : boolean | Filters bad URLs. | |
escapeHtml ( $s ) | ||
freezeSpaces ( $s ) | ||
getBlockPatterns ( ) | ||
getDOM ( ) | ||
getLinePatterns ( ) | ||
getOutputMode ( ) : integer | Get HTML/XHTML output mode | |
invokeAroundHandlers ( $event, |
Invoke registered around-handlers. | |
invokeHandlers ( $event, array $args ) : void | Invoke registered after-handlers. | |
isRelative ( $URL ) | ||
normalize ( $s ) | ||
outdent ( $s ) | ||
prependRoot ( $URL, $root ) | ||
process ( $text, $singleLine = FALSE ) : string | Converts document in Texy! to (X)HTML code. | |
processLine ( $text ) : string | Converts single line in Texy! to (X)HTML code. | |
processTypo ( $text ) : string | Makes only typographic corrections. | |
protect ( $child, $contentType ) : string | Generate unique mark - useful for freezing (folding) some substrings. | |
registerBlockPattern ( $handler, $pattern, $name ) | ||
registerLinePattern ( $handler, $pattern, $name, $againTest = NULL ) | ||
registerPostLine ( $handler, $name ) | ||
setOutputMode ( $mode ) : void | Set HTML/XHTML output mode (overwrites self::$allowedTags) | |
stringToHtml ( $s ) : string | Converts internal string representation to final HTML code. | |
stringToText ( $s ) : string | Converts internal string representation to final HTML code. | |
toText ( ) : string | Converts DOM structure to pure text. | |
unProtect ( $html ) | ||
unescapeHtml ( $s ) | ||
unfreezeSpaces ( $s ) | ||
webalize ( $s, $charlist = NULL ) |
Method | Description | |
---|---|---|
loadModules ( ) | Create array of all used modules ($this->modules). |
final public addHandler ( $event, $callback ) : void | ||
return | void |
public getOutputMode ( ) : integer | ||
return | integer |
final public invokeAroundHandlers ( $event, |
||
$parser | ||
$args | array | |
return | mixed |
final public invokeHandlers ( $event, array $args ) : void | ||
$args | array | |
return | void |
protected loadModules ( ) |
public processLine ( $text ) : string | ||
return | string | output HTML code |
public processTypo ( $text ) : string | ||
return | string | output text |
final public registerBlockPattern ( $handler, $pattern, $name ) |
final public registerLinePattern ( $handler, $pattern, $name, $againTest = NULL ) |
public setOutputMode ( $mode ) : void | ||
return | void |
final public stringToHtml ( $s ) : string | ||
return | string |
final public stringToText ( $s ) : string | ||
return | string |
public BlockModule,Texy\Modules $blockModule | ||
return |
public BlockQuoteModule,Texy\Modules $blockQuoteModule | ||
return |
public array $dtd | ||
return | array |
public EmoticonModule,Texy\Modules $emoticonModule | ||
return |
public FigureModule,Texy\Modules $figureModule | ||
return |
public HeadingModule,Texy\Modules $headingModule | ||
return |
public HorizLineModule,Texy\Modules $horizLineModule | ||
return |
public HtmlModule,Texy\Modules $htmlModule | ||
return |
public HtmlOutputModule,Texy\Modules $htmlOutputModule | ||
return |
public ImageModule,Texy\Modules $imageModule | ||
return |
public LinkModule,Texy\Modules $linkModule | ||
return |
public ListModule,Texy\Modules $listModule | ||
return |
public LongWordsModule,Texy\Modules $longWordsModule | ||
return |
public ParagraphModule,Texy\Modules $paragraphModule | ||
return |
public PhraseModule,Texy\Modules $phraseModule | ||
return |
public ScriptModule,Texy\Modules $scriptModule | ||
return |
public TableModule,Texy\Modules $tableModule | ||
return |
public TypographyModule,Texy\Modules $typographyModule | ||
return |