Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
editor_tiny\editor Class Reference
Inheritance diagram for editor_tiny\editor:
texteditor

Public Member Functions

 __construct ()
 Instantiate the new editor instance.
 
 get_preferred_format ()
 Returns main preferred text format.
 
 get_supported_formats ()
 Returns list of supported text formats.
 
 get_text ()
 Get the text set for this form field.
 
 head_setup ()
 Setup all JS and CSS needed for editor.
 
 set_text ($text)
 Set the text set for this form field.
 
 supported_by_browser ()
 Is editor supported in current browser?
 
 supports_repositories ()
 Supports file picker and repos?
 
 use_editor ($elementid, array $options=null, $fpoptions=null)
 Add required JS needed for editor.
 

Static Public Member Functions

static set_default_configuration (manager $manager)
 Set the default configuration for the editor.
 

Protected Attributes

manager $manager
 The Tiny Manager instace.
 
string $text = ''
 $text The text set to the editor in the form.
 

Static Protected Attributes

static stdClass null $defaultconfiguration = null
 The default configuration to use if none is provided.
 

Member Function Documentation

◆ get_preferred_format()

texteditor::get_preferred_format ( )
abstractinherited

Returns main preferred text format.

Return values
inttext format

Reimplemented in atto_texteditor, and textarea_texteditor.

◆ get_supported_formats()

texteditor::get_supported_formats ( )
abstractinherited

Returns list of supported text formats.

Return values
arrayArray (FORMAT=>FORMAT)

Reimplemented in atto_texteditor, and textarea_texteditor.

◆ get_text()

texteditor::get_text ( )
inherited

Get the text set for this form field.

Can be called from "use_editor".

Return values
string

◆ head_setup()

texteditor::head_setup ( )
inherited

Setup all JS and CSS needed for editor.

Return values
void

◆ set_default_configuration()

static editor_tiny\editor::set_default_configuration ( manager $manager)
static

Set the default configuration for the editor.

Parameters
manager$managerThe editor manager

◆ set_text()

texteditor::set_text ( $text)
inherited

Set the text set for this form field.

Will be called before "use_editor".

Parameters
string$textThe text for the form field.

◆ supported_by_browser()

texteditor::supported_by_browser ( )
abstractinherited

Is editor supported in current browser?

Return values
bool

Reimplemented in atto_texteditor, and textarea_texteditor.

◆ supports_repositories()

texteditor::supports_repositories ( )
abstractinherited

Supports file picker and repos?

Return values
objectbook object

Reimplemented in atto_texteditor, and textarea_texteditor.

◆ use_editor()

texteditor::use_editor ( $elementid,
array $options = null,
$fpoptions = null )
abstractinherited

Add required JS needed for editor.

Valid options may vary by editor. See the individual editor implementations of this function for documentation.

Parameters
string$elementidid of text area to be converted to editor
array$optionsEditor options
obejct$fpoptionsfile picker options
Return values
void

Reimplemented in atto_texteditor, and textarea_texteditor.

Member Data Documentation

◆ $text

string texteditor::$text = ''
protectedinherited

$text The text set to the editor in the form.

Since
3.0

The documentation for this class was generated from the following file: