Class humhub\modules\content\widgets\richtext\ProsemirrorRichTextEditor

Inheritancehumhub\modules\content\widgets\richtext\ProsemirrorRichTextEditor » humhub\modules\content\widgets\richtext\AbstractRichTextEditor » humhub\modules\ui\form\widgets\JsInputWidget » humhub\widgets\JsWidget » humhub\components\Widget » yii\base\Widget
Available since version1.3

Rich text editor implementation for the ProsemirrorRichText.

See also humhub\modules\content\widgets\richtext\ProsemirrorRichText for a more detailed description of supported plugins and features.

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 humhub\modules\content\widgets\richtext\AbstractRichTextEditor
$disabledText string humhub\modules\content\widgets\richtext\AbstractRichTextEditor
$events [] humhub\widgets\JsWidget
$exclude array humhub\modules\content\widgets\richtext\AbstractRichTextEditor
$fadeIn boolean|string|integer humhub\widgets\JsWidget
$focus boolean humhub\modules\content\widgets\richtext\AbstractRichTextEditor
$form \yii\widgets\ActiveForm humhub\modules\ui\form\widgets\JsInputWidget
$id string humhub\widgets\JsWidget
$include array humhub\modules\content\widgets\richtext\AbstractRichTextEditor
$init mixed humhub\widgets\JsWidget
$jsWidget string humhub\modules\content\widgets\richtext\ProsemirrorRichTextEditor
$label boolean Defines if the default label should be rendered. humhub\modules\content\widgets\richtext\AbstractRichTextEditor
$layout string Defines the style/layout of the richtext humhub\modules\content\widgets\richtext\AbstractRichTextEditor
$mentioningUrl string humhub\modules\content\widgets\richtext\AbstractRichTextEditor
$menuClass string Defines the editor style, which will be added as class attribute humhub\modules\content\widgets\richtext\ProsemirrorRichTextEditor
$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 array The HTML attributes for the input tag. humhub\modules\ui\form\widgets\JsInputWidget
$placeholder string humhub\modules\content\widgets\richtext\AbstractRichTextEditor
$pluginOptions array humhub\modules\content\widgets\richtext\AbstractRichTextEditor
$preset string Richtext feature preset e. humhub\modules\content\widgets\richtext\AbstractRichTextEditor
$render boolean If set to false this widget won't be rendered humhub\components\Widget
$renderer humhub\modules\content\widgets\richtext\ProsemirrorRichTextEditor
$value string The input value. humhub\modules\ui\form\widgets\JsInputWidget
$visible boolean humhub\widgets\JsWidget

Public Methods

Hide inherited methods

MethodDescriptionDefined By
beforeRun() Initializes the widget. humhub\modules\ui\form\widgets\JsInputWidget
getAttributes() Returns all html attributes for used by this widget and will normally inserted in the widgets root html element. humhub\modules\content\widgets\richtext\ProsemirrorRichTextEditor
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
getInputAttributes() humhub\modules\content\widgets\richtext\AbstractRichTextEditor
getLabel() humhub\modules\content\widgets\richtext\AbstractRichTextEditor
getMentioningUrl() humhub\modules\content\widgets\richtext\AbstractRichTextEditor
init() humhub\modules\content\widgets\richtext\ProsemirrorRichTextEditor
prepend() Prepends an upload input form element to the rich text editor used by the upload editor plugin. humhub\modules\content\widgets\richtext\ProsemirrorRichTextEditor
process() Process is a wrapper for the run method humhub\components\Widget
run() Default implementation of JsWidget. humhub\widgets\JsWidget
setDefaultOptions() Sets some default data options required by all widgets as the widget implementation and the widget evetns and initialization trigger. humhub\widgets\JsWidget
widget() Creates a widget instance and runs it. humhub\components\Widget

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
editOutput() Returns the content formatted for editing by means of the configured $renderer. humhub\modules\content\widgets\richtext\AbstractRichTextEditor
getData() Returns an array of data-* attributes to configure your clientside js widget. humhub\widgets\JsWidget
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

$jsWidget public property
public string $jsWidget 'ui.richtext.prosemirror.RichTextEditor'
$menuClass public property

Defines the editor style, which will be added as class attribute

public string $menuClass null
$renderer public static property
public static $renderer = ['class' => \humhub\modules\content\widgets\richtext\ProsemirrorRichText::class]

Method Details

getAttributes() public method

Returns all html attributes for used by this widget and will normally inserted in the widgets root html element.

public [] getAttributes ( )
init() public method

public void init ( )
prepend() public method

Prepends an upload input form element to the rich text editor used by the upload editor plugin.

public void prepend ( )