Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • ActionActiveForm
  • ActionActiveFormBase
  • CActiveForm
  • CalendarEventActiveForm
  • CallActiveForm
  • CClipWidget
  • CContentDecorator
  • CFilterWidget
  • CFlexWidget
  • CHtmlPurifier
  • CInputWidget
  • CMarkdown
  • CMaskedTextField
  • CMultiFileUpload
  • COutputCache
  • COutputProcessor
  • CStarRating
  • CTabView
  • CTextHighlighter
  • CTreeView
  • CWidget
  • EventActiveForm
  • MobileActiveForm
  • NoteActiveForm
  • TimeActiveForm
  • X2ActiveForm
  • X2StarRating
  • Overview
  • Package
  • Class
  • Tree

Class CMarkdown

CMarkdown converts the captured content from markdown syntax to HTML code.

CMarkdown can be used as either a widget or a filter. It is a wrapper of CMarkdownParser. CMarkdown adds an additional option CMarkdown::$purifyOutput which can be set true so that the converted HTML code is purified before being displayed.

For details about the markdown syntax, please check the following:
  • official markdown syntax
  • markdown extra syntax
  • CMarkdownParser markdown with syntax highlighting
CComponent
Extended by CBaseController
Extended by CWidget
Extended by CFilterWidget implements IFilter
Extended by COutputProcessor
Extended by CMarkdown
Package: system\web\widgets
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/web/widgets/CMarkdown.php
Methods summary
public
# processOutput( string $output )

Processes the captured output. This method converts the content in markdown syntax to HTML code. If CMarkdown::$purifyOutput is true, the HTML code will also be purified.

Processes the captured output. This method converts the content in markdown syntax to HTML code. If CMarkdown::$purifyOutput is true, the HTML code will also be purified.

Parameters

$output
string
$output the captured output to be processed

See

convert

Overrides

COutputProcessor::processOutput()
public string
# transform( string $output )

Converts the content in markdown syntax to HTML code. This method uses CMarkdownParser to do the conversion.

Converts the content in markdown syntax to HTML code. This method uses CMarkdownParser to do the conversion.

Parameters

$output
string
$output the content to be converted

Returns

string
the converted content
public
# registerClientScript( )

Registers the needed CSS and JavaScript.

Registers the needed CSS and JavaScript.

public static
# registerCssFile( string $url = null )

Registers the needed CSS file.

Registers the needed CSS file.

Parameters

$url
string
$url the CSS URL. If null, a default CSS URL will be used.
public CMarkdownParser
# getMarkdownParser( )

Returns the markdown parser instance. This method calls CMarkdown::createMarkdownParser() to create the parser instance. Call this method multipe times will only return the same instance.

Returns the markdown parser instance. This method calls CMarkdown::createMarkdownParser() to create the parser instance. Call this method multipe times will only return the same instance.

Returns

CMarkdownParser
the parser instance
protected CMarkdownParser
# createMarkdownParser( )

Creates a markdown parser. By default, this method creates a CMarkdownParser instance.

Creates a markdown parser. By default, this method creates a CMarkdownParser instance.

Returns

CMarkdownParser
the markdown parser.
Methods inherited from COutputProcessor
init(), onProcessOutput(), run()
Methods inherited from CFilterWidget
__construct(), filter(), getIsFilter()
Methods inherited from CWidget
actions(), getController(), getId(), getOwner(), getViewFile(), getViewPath(), render(), setId()
Methods inherited from CBaseController
beginCache(), beginClip(), beginContent(), beginWidget(), createWidget(), endCache(), endClip(), endContent(), endWidget(), renderFile(), renderInternal(), widget()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public mixed $cssFile
#

the CSS file used for the widget. Defaults to null, meaning using the default CSS file included together with the widget. If false, no CSS file will be used. Otherwise, the specified CSS file will be included when using this widget.

the CSS file used for the widget. Defaults to null, meaning using the default CSS file included together with the widget. If false, no CSS file will be used. Otherwise, the specified CSS file will be included when using this widget.

public boolean $purifyOutput false
#

whether to use CHtmlPurifier to purify the generated HTML code. Defaults to false.

whether to use CHtmlPurifier to purify the generated HTML code. Defaults to false.

Properties inherited from CFilterWidget
$stopAction
Properties inherited from CWidget
$actionPrefix, $skin
Magic properties summary
public CMarkdownParser $markdownParser
#

The parser instance.

The parser instance.

Magic properties inherited from CFilterWidget
$isFilter
Magic properties inherited from CWidget
$controller, $id, $owner, $viewPath
API documentation generated by ApiGen 2.8.0