Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
atto_texteditor Class Reference

This is the texteditor implementation. More...

Inheritance diagram for atto_texteditor:
texteditor

Public Member Functions

 get_preferred_format ()
 Returns text format preferred by this editor.
 
 get_supported_formats ()
 Returns array 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 the current browser supported by this editor?
 
 supports_repositories ()
 Does this editor support picking from repositories?
 
 use_editor ($elementid, array $options=null, $fpoptions=null)
 Use this editor for given element.
 

Protected Member Functions

 get_init_params ($elementid, array $options=null, array $fpoptions=null, $plugins=null)
 Create a params array to init the editor.
 

Protected Attributes

string $text = ''
 $text The text set to the editor in the form.
 

Detailed Description

This is the texteditor implementation.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ get_init_params()

atto_texteditor::get_init_params ( $elementid,
array $options = null,
array $fpoptions = null,
$plugins = null )
protected

Create a params array to init the editor.

Parameters
string$elementid
array$options
array$fpoptions

◆ get_preferred_format()

atto_texteditor::get_preferred_format ( )

Returns text format preferred by this editor.

Return values
int

Reimplemented from texteditor.

◆ get_supported_formats()

atto_texteditor::get_supported_formats ( )

Returns array of supported text formats.

Return values
array

Reimplemented from 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_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()

atto_texteditor::supported_by_browser ( )

Is the current browser supported by this editor?

Of course!

Return values
bool

Reimplemented from texteditor.

◆ supports_repositories()

atto_texteditor::supports_repositories ( )

Does this editor support picking from repositories?

Return values
bool

Reimplemented from texteditor.

◆ use_editor()

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

Use this editor for given element.

Available Atto-specific options: atto:toolbar - set to a string to override the system config editor_atto/toolbar

Available general options: context - set to the current context object enable_filemanagement - set false to get rid of the managefiles plugin autosave - true/false to control autosave

Options are also passed through to the plugins.

Parameters
string$elementid
array$options
null$fpoptions

Reimplemented from 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: