Documentation

TinyMCE4RichText extends RichText
in package

Interface the display of a richtext field

Table of Contents

Methods

draw()  : mixed
Draw a rich text field
needs()  : void
Loads the required TinyMCE JS library
drawInternal()  : mixed
Shows a richtext field. Should output content directly

Methods

draw()

Draw a rich text field

public static draw(mixed $field_name, mixed $content[, int $width = 600 ][, int $height = 300 ][, string|null $type = null ]) : mixed

Field type should be a class name sans 'RichText', e.g. 'TinyMCE4' for the 'TinyMCE4RichText' class. Optionally, the name can be bollowed by : and a config group name, e.g. 'TinyMCE4:Lite' for the 'Lite' config.

Parameters
$field_name : mixed

The name of the field to draw.

$content : mixed

The content of the field, in HTML, but not escaped in any way.

$width : int = 600

The width of the field, in pixels. Default = 600

$height : int = 300

The height of the field, in pixels. Default = 300

$type : string|null = null

Override the field type. Default as per configuration and $_GET/$_SESSION overrides

needs()

Loads the required TinyMCE JS library

public static needs() : void

drawInternal()

Shows a richtext field. Should output content directly

protected drawInternal(string $field_name, string $content[, int $width = 600 ][, int $height = 300 ][, string $config_group = null ]) : mixed
Parameters
$field_name : string

The field name

$content : string

The content of the richtext field, in HTML

$width : int = 600

The width of the field, in pixels

$height : int = 300

The height of the field, in pixels

$config_group : string = null

Specific configuration to use instead of the default

On this page

Search results