Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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. More...
 
 get_supported_formats ()
 Returns array of supported text formats. More...
 
 get_text ()
 Get the text set for this form field. More...
 
 head_setup ()
 Setup all JS and CSS needed for editor. More...
 
 set_text ($text)
 Set the text set for this form field. More...
 
 supported_by_browser ()
 Is the current browser supported by this editor? More...
 
 supports_repositories ()
 Does this editor support picking from repositories? More...
 
 use_editor ($elementid, array $options=null, $fpoptions=null)
 Use this editor for given element. More...
 

Protected Member Functions

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

Protected Attributes

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

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

Reimplemented in tinymce_texteditor.

◆ 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: