Class humhub\modules\ui\form\widgets\Markdown

Inheritancehumhub\modules\ui\form\widgets\Markdown » humhub\modules\ui\form\widgets\JsInputWidget » humhub\widgets\JsWidget » humhub\components\Widget » yii\base\Widget
Subclasseshumhub\widgets\MarkdownField
Available since version1.2.2

Simple Markdown Editor form fields.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$attribute string The model attribute that this widget is associated with. humhub\modules\ui\form\widgets\JsInputWidget
$container string Html container element. humhub\widgets\JsWidget
$content string Html content. humhub\widgets\JsWidget
$disabled boolean If set to true the markdown field will be disabled humhub\modules\ui\form\widgets\Markdown
$events [] humhub\widgets\JsWidget
$fadeIn boolean|string|integer humhub\modules\ui\form\widgets\Markdown
$fileAttribute string humhub\modules\ui\form\widgets\Markdown
$fileModel string humhub\modules\ui\form\widgets\Markdown
$filesInputName string Defines the name of the hidden input name for uploaded files if not set the UploadButton default is used humhub\modules\ui\form\widgets\Markdown
$form \yii\widgets\ActiveForm humhub\modules\ui\form\widgets\JsInputWidget
$id string humhub\widgets\JsWidget
$init mixed humhub\modules\ui\form\widgets\Markdown
$jsWidget string humhub\modules\ui\form\widgets\Markdown
$label boolean Show label humhub\modules\ui\form\widgets\Markdown
$model \yii\base\Model The data model that this widget is associated with. humhub\modules\ui\form\widgets\JsInputWidget
$name string The input name. humhub\modules\ui\form\widgets\JsInputWidget
$options humhub\widgets\JsWidget
$parserClass string humhub\modules\ui\form\widgets\Markdown
$placeholder string humhub\modules\ui\form\widgets\Markdown
$previewUrl string Markdown preview url humhub\modules\ui\form\widgets\Markdown
$readonly boolean If set to true the markdown field will set to readonly humhub\modules\ui\form\widgets\Markdown
$render boolean If set to false this widget won't be rendered humhub\components\Widget
$rows integer Defines the HTML rows attribute of the textarea humhub\modules\ui\form\widgets\Markdown
$value string The input value. humhub\modules\ui\form\widgets\JsInputWidget
$visible boolean humhub\widgets\JsWidget
$widgetLayout string Defines an optional layout humhub\components\Widget

Public Methods

Hide inherited methods

MethodDescriptionDefined By
beforeRun() Initializes the widget. humhub\modules\ui\form\widgets\JsInputWidget
getAttributes() humhub\modules\ui\form\widgets\Markdown
getData() humhub\modules\ui\form\widgets\Markdown
getId() Returns the html id of this widget, if no id is set this function will generate an id if $autoGenerate is set to true (default). humhub\widgets\JsWidget
getLayoutViewParams() Returns an array of view parameter used if \humhub\components\layout is set. humhub\components\Widget
init() humhub\modules\ui\form\widgets\Markdown
process() Process is a wrapper for the run method humhub\components\Widget
run() humhub\modules\ui\form\widgets\Markdown
setDefaultOptions() Sets some default data options required by all widgets as the widget implementation and the widget events and initialization trigger. humhub\widgets\JsWidget
widget() Creates a widget instance and runs it. humhub\components\Widget

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
getOptions() Assembles all widget attributes and data settings of this widget. humhub\widgets\JsWidget
getValue() humhub\modules\ui\form\widgets\JsInputWidget
hasModel() humhub\modules\ui\form\widgets\JsInputWidget

Events

Hide inherited events

EventTypeDescriptionDefined By
EVENT_CREATE humhub\libs\WidgetCreateEvent An event raised before creating a widget. humhub\components\Widget

Property Details

$disabled public property

If set to true the markdown field will be disabled

public boolean $disabled false
$fadeIn public property
public boolean|string|integer $fadeIn 'fast'
$fileAttribute public property
public string $fileAttribute null
$fileModel public property
public string $fileModel null
$filesInputName public property

Defines the name of the hidden input name for uploaded files if not set the UploadButton default is used

See also humhub\modules\file\widgets\UploadButton.

public string $filesInputName null
$init public property
public mixed $init true
$jsWidget public property
public string $jsWidget 'ui.markdown.MarkdownField'
$label public property

Show label

public boolean $label false
$parserClass public property
public string $parserClass "HMarkdown"
$placeholder public property
public string $placeholder null
$previewUrl public property

Markdown preview url

public string $previewUrl null
$readonly public property

If set to true the markdown field will set to readonly

public boolean $readonly false
$rows public property

Defines the HTML rows attribute of the textarea

public integer $rows 3

Method Details

getAttributes() public method

public void getAttributes ( )
getData() public method

public void getData ( )
init() public method

public void init ( )
run() public method

public void run ( )