Text editor: Difference between revisions

From MoodleDocs
(reformat a bit, change intro)
m (Text replacement - "class="nicetable"" to "class="wikitable"")
 
(164 intermediate revisions by 19 users not shown)
Line 1: Line 1:
{{Editing text}}
{{Editing text}}
<p class="note">'''Please refer to [[Page_notes#Editing text|these notes]] before editing this page.'''</p>
==Using a text editor==
The text editor (sometimes referred to as the HTML editor) has many icons to assist the user in entering content.  Many of these icons and functions should be familiar to anyone who uses a word processor.  Some examples of where you will see the text editor include: Editing Section headings, description of an activity, writing an answer to a quiz question or editing the content of many blocks.


[[Image:HTMLeditor tools M2 1.png|frame|center|The standard version of the text editor tool bar]]
The text editor (sometimes referred to as the 'HTML editor') has many icons to assist the user in entering content.  Many of these icons and functions should be familiar to anyone who uses a word processor. 


==Video introduction to the text editor==
Some examples of where you will see the text editor include: Editing Section headings, description of an activity, writing an answer to a quiz question or editing the content of many blocks.
HTML editor in Moodle 2.0 video:


<mediaplayer>http://www.youtube.com/watch?v=xJE6UhqnyjU</mediaplayer>
The default text editor in Moodle is the Atto editor, built specifically for Moodle. There is also a version of the [[TinyMCE editor]] and a plain text editor.


Text editors can be enabled, disabled or a different one set to default from ''Administration > Site administration > Plugins > Text editors > Manage editors''. The order of priority may also be specified here.


==List of groups==
If more than one text editor is enabled, users can select their preferred editor via their preferences page in the user menu (top right).
For those who are not familiar with the tool bar, here are the functions listed by group using the above example.  Remember that the site administrator can edit or provide additonal toolbars.


Row 1
==Atto HTML editor==
*[[Image:HTML_editor_group_font_style.png]] - Font, size and heading group
*[[Image:HTML_editor_group_undo_redo.png]] - Undo and Redo group
*[[Image:HTML_editor_group_find_replace.png]] - Find and Replace group
*[[Image:HTML_editor_group_fullscreen_1.png]]|Full screen toggle
Row 2
*[[Image:HTML editor group text effects.png]] - Text effect group
*[[Image:HTML editor group line format.png]] - Line format group
*[[Image:HTML_editor_group_formatting.png]] - Formatting group
*[[Image:HTML_editor_group_color.png]] - Color group
*[[Image:HTML_editor_group_paragraph.png]] - Paragraph group


Row 3
{{MediaPlayer | url = https://youtu.be/mfpCJzNcX_I | desc = }}
*[[Image:HTML_editor_group_lists.png]] - Number and Bullets and indents
*[[Image:HTML_editor_group_link.png]] - Link group
*[[Image:HTML_editor_group_insert.png]] - Insert group
*[[Image:HTML_editor_group_HTML_spell.png]] - HTML source toggle & spellchecker


==Special features==
{{New features}}
===Color pickers===
Students and teachers (e.g. in language teching) may directly record video or audio in most areas where the Atto editor is present:
*[[Image:HTML_editor_group_color.png]]
{{MediaPlayer | url = https://youtu.be/gr4mw1qvcWM | desc =}}
There are 4 levels of selecting a font or background color,
*A quick pick 5x8 matrix of colors
*"More colors" that links to Picker, Pallet and Named tabs
<gallery>
Image:HTML_editor_color_selector_basic_1.png|A quick pick 5x8 matrix of colors
Image:HTML_editor_color_selector_more_picker_1.png|A rainbow color picker tab
Image:HTML_editor_color_selector_more_pallet_1.png|A Pallet tab with a 18x12 matrix of colors
Image:HTML_editor_color_selector_more_named_1.png|A Named tab with custom pallets
</gallery>


===Insert images and media===
Administrators can configure this from Site administration>Plugins>Text editors>Atto editor.
[[Image:HTML_editor_group_insert_MU_1.png|frame|center|The Insert images and media group]]


* 1 Insert Image - uses [[File picker]]
==Atto editor toolbar layout==
* 2 Insert Emoticon
* 3 Insert Media - uses [[File picker]]
* 4 Insert Equation - uses java script editor
* 5 Insert Non breaking space
* 6 Insert Custom character - Special keyboard characters
* 7 Insert Table -


[[File:Attotopline1.png]]


====File picker ====
Atto Row 1
[[Image:Files_File_picker_upload_files_add_1.png|thumb|center|300px|Upload file screen]]


====Equation editor====
[[Image:HTML editor equation editor 1.png|thumb|center|300px|]]


====Custom character====
{| class="wikitable"
[[Image:HTML_editor_custom_character_selector_1.png|thumb|center|300px|]]
|-
|-
| 1:Expand
| 2.Style
| 3.Bold
| 4.Italic
|-
| 5.Bulleted list
| 6.Numbered list
| 7.Add link
| 8.Unlink
|-
| 9.Add image
| 10.Add smiley (if enabled)
| 11.Add media
| 12.Record audio
|-
| 13. Record video
| 14. Manage embedded files
|}


====Insert table====
 
<gallery widths="300px">
 
Image:HTMLeditor_Insert_Table_general_1.png|General tab
[[File:Attobottomline.png]]
Image:HTMLeditor_Insert_Table_advanced_1.png|Advanced tab
 
</gallery>
Atto Row 2
 
{| class="wikitable"
|-
|-
| 1. Underline
| 2. Strikethrough
| 3. Subscript
| 4. Superscript
|-
| 5. Align left/centre/right
| 6. Decrease/increase indent
| 7. Equation editor
| 8. Special character
|-
| 9. Table
| 10. Clear formatting
| 11. Undo/redo
| 12. Accessibility checker
|-
| 13. Screenreader helper
| 14. HTML/code view
|
|}
 
==Manage embedded files==
This allows users to add, delete or override files embedded in the current text area, for example in a label or topic summary. (It complements the [[Embedded files repository]])
 
[[File:26embeddefiles2.png|thumb|400px|center]]
 
===Image drag and drop===
 
If your browser allows it (and if it does, you will see a message at the top of your screen when the editing is on) you can add images into the Atto editor simply by dragging them from your computer:
 
[[File:Attodragdrop29.png|thumb|600px|center|Drag an image directly into the editor]]
 
===Autosave===
 
Text typed into the Atto editor is automatically saved if you leave the page. The default of 60 seconds may be changed by the administrator in ''Site administration>Plugins>Text editors>Atto HTML editor>Atto toolbar settings.'' If the user accidentally closes the tab or otherwise leaves the form without submitting, the text in the editor will be restored next time he opens the page. To discard  a restored draft, the  user needs to cancel the form or press the "Undo" button in the editor.
[[File:AtttoAutosave.png|thumb|600px|center]]
 
===Accessibility checker===
 
One of the tools available in the text editor is an automated [[Accessibility|accessibility]] checker which checks for some common errors in the text. These are usually things in the way the text is constructed that can prevent all users from having equal access to information and functionality. The list of problems that the accessibility checker looks for is:
 
* Images with missing or empty alt text (unless they have the presentation role)
* Contrast of font colour and background colour meets [https://en.wikipedia.org/wiki/Web_Content_Accessibility_Guidelines WCAG AA guidelines]
* Long blocks of text are sufficiently broken up into headings
* All tables require captions
* Tables should not contain merged cells as they are difficult to navigate with screen readers
* All tables should contain row or column headers
 
===Screenreader helper===
 
Screen readers basically treat a content editable region like a text box - which is wrong, because it can contain images, links and more.
 
The screen reader helper provides additional information about the currently selected text (e.g. is it bold), as well as a listing of any images or links in the text.
 
==Equation editor==
 
If either the [[MathJax filter|MathJax]] or the [[TeX notation filter|TeX notation]] filters are enabled (in ''Administration > Site administration > Plugins > Filters > Manage filters'') then an equation editor button is provided in the toolbar for launching the equation editor.
 
In Moodle 3.0 onwards, extra buttons are provided for square roots, fractions and vectors.
[[Image:30equationeditor.png|thumb|center|Equation editor]]
 
==Table editor==
 
If the administrator has enabled the extra settings for the Atto table editor (see below) then border styling, sizing  and colours are available when creating a table:
 
[[File:AttoTableRevised.png|center|thumb|center]]
 
==Site administration settings==
 
===Toolbar settings===
 
The administrator can specify which plugins to display and in which order from ''Administration > Site administration > Plugins > Text editors > Atto HTML editor > Atto toolbar settings''.
[[File:atto-plugins.png|thumb|center|450px|Atto Plugins]]
 
====Toolbar config table====
The toolbar is split into groups of related buttons. The format for the config setting is:
 
groupname1 = button1, button2, button3
groupname2 = button1, button2, button3
 
The group names on the left have no effect on how the toolbar works; they just need to be different for each button (and no spaces please). The list of buttons says which button goes in which group and in what order. The exact word to insert here for each button is listed in the "Toolbar config" column above.
 
The reason there are names for the groups is that it helps to make you think about how to group the buttons sensibly and not just stick new buttons in random locations. Ie. all the buttons in the "files" group interact with the file picker in some way
 
===Adding extra buttons===
 
Extra plugins from the list (for example 'Font color' or 'Emoticon') may be added by typing the toolbarconfig term into the toolbar config table.
 
[[File:toolbarconfig.png]]
 
Here for example are the available colours when 'fontcolor' is added:
 
[[File:fontcolor.png]]
 
The icons are displayed in related groups and the administrator can decide how many groups to display in the default collapsed state of the toolbar (that is, how many groups to display on Row 1).
 
====Autosave frequency====
Text is automatically saved at regular intervals so it may be restored when the user returns to a form they had previously left. This setting allows the administrator to specify the time between autosaves. The default is one minute.
==== Non default Atto plugins ====
Not all plugins are enabled by default and the administrator of each site should give careful thought as to which plugins they choose to enable for their users. Here are some things to consider before enabling the non-default plugins:
 
===== Background colour / Font colour =====
While these are very popular plugins, there are downsides to enabling their use on a site. Firstly - user specified colours may conflict visually with the site colours chosen by the theme designer. Even if the colours of the content do not conflict with the colours of the current theme, if the theme is changed in future, or the content is reused on a different site conflicts may be introduced. There are 2 possible types of conflicts, the first is just a visually unappealing combination of colours, the second is a combination of colours that may produce text that is hard to read for some people. It is preferable if the theme designer uses some interesting colours that meet the accessibility standards required for the site in the theme for the site, and the person creating the content simply uses the proper heading levels (for example) to make use of those styles.
 
===== Emoticons =====
The emoticon plugin inserts text representations of the emoticons in the content. The emoticon filter is responsible for converting these text sequences into proper smiley images. The emoticon filter is not enabled by default, which is why the emoticon plugin for Atto is not enabled by default.
 
===== No-auto link =====
In general, the more plugins are added to the Atto toolbar, the harder it becomes to find specific plugins. Because the no-auto link plugin is not felt to be widely used it is not enabled by default.
 
===== Right to left =====
Because this plugin is only useful for courses where text needs to be written in a mixture of both "left to right" and "right to left" languages, it is not enabled by default.
 
==== Moodle plugins directory ====
 
There are more plugins available for Atto than just those included in a default install.
See the [https://moodle.org/plugins/browse.php?list=category&id=53 Moodle plugins directory] for additional plugins.
Some example plugins include the following:
 
===== Cloze editor for Atto=====
[[Cloze editor for Atto|This]] is a plugin for easily making [[Embedded Answers (Cloze) question type]] questions inside the standard Moodle Atto text  editor.
 
===== Toggle preview =====
This plugin allows you view the content as it would be seen by a reader.
 
===== Chemistry plugins =====
There are a number of chemistry plugins that support chemistry equations and structures.
 
===== Text import plugins =====
There are a number of plugins that support importing text from other sources.
The [https://moodle.org/plugins/view/atto_pastespecial Paste special] plugin minimises the amount of superfluous HTML markup
included when pasting content from an external editor such as Microsoft Word.
 
The [https://moodle.org/plugins/view/atto_wordimport Word Import] plugin (beta) supports importing an entire Word document,
including embedded images.
 
 
===Equation editor settings===
 
Equation editor commands may be removed, added or reordered in ''Administration > Site administration > Plugins > Text editors > Atto HTML editor > Equation editor settings''.
 
[[File:equationeditor.png]]
 
===Table editor settings===
Styles, colours and sizes for tables and their borders may be enabled from ''Administration > Site administraton >Plugins > Test editors > Atto HTML editor > Table settings.''


==See also==
==See also==
*[[TinyMCE]] is the default HTML editor in Moodle.
* [https://www.youtube.com/watch?v=NBx0O9cQzBA Moodle HQ screencast demonstrating Atto editor]
*[[Text editors]] - Moodle 2.0 will handle many kind of text editors
 
*[[HTML editor|Pre Moodle 2.0 HTML editor]] tool bar
* [[Text editor FAQ]]
*Site administration>Appearence>HTML settings - to change emoticon HTML code or images
* [[Embedded files repository]]
*Site administration>>Plugins>Text editors - change spellchecker and manage text editors
* [[Word count quick guide]] - Word count is a plugin for the [[Text editor|Atto text editor]] which is used to create content within Moodle. This plugin enables the author of text, such as a student,  to check how many words and letters are in a  piece of text.
[[Category:HTML editor]]
 
[[Category:Site administration]]
[[Category:Language teaching]]
 
[[de:Text-Editor]]
[[es:Editor de texto]]

Latest revision as of 15:14, 10 August 2021

Using a text editor

The text editor (sometimes referred to as the 'HTML editor') has many icons to assist the user in entering content. Many of these icons and functions should be familiar to anyone who uses a word processor.

Some examples of where you will see the text editor include: Editing Section headings, description of an activity, writing an answer to a quiz question or editing the content of many blocks.

The default text editor in Moodle is the Atto editor, built specifically for Moodle. There is also a version of the TinyMCE editor and a plain text editor.

Text editors can be enabled, disabled or a different one set to default from Administration > Site administration > Plugins > Text editors > Manage editors. The order of priority may also be specified here.

If more than one text editor is enabled, users can select their preferred editor via their preferences page in the user menu (top right).

Atto HTML editor

New feature
in Moodle 3.5!

Students and teachers (e.g. in language teching) may directly record video or audio in most areas where the Atto editor is present:

Administrators can configure this from Site administration>Plugins>Text editors>Atto editor.

Atto editor toolbar layout

Attotopline1.png

Atto Row 1


1:Expand 2.Style 3.Bold 4.Italic
5.Bulleted list 6.Numbered list 7.Add link 8.Unlink
9.Add image 10.Add smiley (if enabled) 11.Add media 12.Record audio
13. Record video 14. Manage embedded files


Attobottomline.png

Atto Row 2

1. Underline 2. Strikethrough 3. Subscript 4. Superscript
5. Align left/centre/right 6. Decrease/increase indent 7. Equation editor 8. Special character
9. Table 10. Clear formatting 11. Undo/redo 12. Accessibility checker
13. Screenreader helper 14. HTML/code view

Manage embedded files

This allows users to add, delete or override files embedded in the current text area, for example in a label or topic summary. (It complements the Embedded files repository)

26embeddefiles2.png

Image drag and drop

If your browser allows it (and if it does, you will see a message at the top of your screen when the editing is on) you can add images into the Atto editor simply by dragging them from your computer:

Drag an image directly into the editor

Autosave

Text typed into the Atto editor is automatically saved if you leave the page. The default of 60 seconds may be changed by the administrator in Site administration>Plugins>Text editors>Atto HTML editor>Atto toolbar settings. If the user accidentally closes the tab or otherwise leaves the form without submitting, the text in the editor will be restored next time he opens the page. To discard a restored draft, the user needs to cancel the form or press the "Undo" button in the editor.

AtttoAutosave.png

Accessibility checker

One of the tools available in the text editor is an automated accessibility checker which checks for some common errors in the text. These are usually things in the way the text is constructed that can prevent all users from having equal access to information and functionality. The list of problems that the accessibility checker looks for is:

  • Images with missing or empty alt text (unless they have the presentation role)
  • Contrast of font colour and background colour meets WCAG AA guidelines
  • Long blocks of text are sufficiently broken up into headings
  • All tables require captions
  • Tables should not contain merged cells as they are difficult to navigate with screen readers
  • All tables should contain row or column headers

Screenreader helper

Screen readers basically treat a content editable region like a text box - which is wrong, because it can contain images, links and more.

The screen reader helper provides additional information about the currently selected text (e.g. is it bold), as well as a listing of any images or links in the text.

Equation editor

If either the MathJax or the TeX notation filters are enabled (in Administration > Site administration > Plugins > Filters > Manage filters) then an equation editor button is provided in the toolbar for launching the equation editor.

In Moodle 3.0 onwards, extra buttons are provided for square roots, fractions and vectors.

Equation editor

Table editor

If the administrator has enabled the extra settings for the Atto table editor (see below) then border styling, sizing and colours are available when creating a table:

AttoTableRevised.png

Site administration settings

Toolbar settings

The administrator can specify which plugins to display and in which order from Administration > Site administration > Plugins > Text editors > Atto HTML editor > Atto toolbar settings.

Atto Plugins

Toolbar config table

The toolbar is split into groups of related buttons. The format for the config setting is:

groupname1 = button1, button2, button3 groupname2 = button1, button2, button3

The group names on the left have no effect on how the toolbar works; they just need to be different for each button (and no spaces please). The list of buttons says which button goes in which group and in what order. The exact word to insert here for each button is listed in the "Toolbar config" column above.

The reason there are names for the groups is that it helps to make you think about how to group the buttons sensibly and not just stick new buttons in random locations. Ie. all the buttons in the "files" group interact with the file picker in some way

Adding extra buttons

Extra plugins from the list (for example 'Font color' or 'Emoticon') may be added by typing the toolbarconfig term into the toolbar config table.

toolbarconfig.png

Here for example are the available colours when 'fontcolor' is added:

fontcolor.png

The icons are displayed in related groups and the administrator can decide how many groups to display in the default collapsed state of the toolbar (that is, how many groups to display on Row 1).

Autosave frequency

Text is automatically saved at regular intervals so it may be restored when the user returns to a form they had previously left. This setting allows the administrator to specify the time between autosaves. The default is one minute.

Non default Atto plugins

Not all plugins are enabled by default and the administrator of each site should give careful thought as to which plugins they choose to enable for their users. Here are some things to consider before enabling the non-default plugins:

Background colour / Font colour

While these are very popular plugins, there are downsides to enabling their use on a site. Firstly - user specified colours may conflict visually with the site colours chosen by the theme designer. Even if the colours of the content do not conflict with the colours of the current theme, if the theme is changed in future, or the content is reused on a different site conflicts may be introduced. There are 2 possible types of conflicts, the first is just a visually unappealing combination of colours, the second is a combination of colours that may produce text that is hard to read for some people. It is preferable if the theme designer uses some interesting colours that meet the accessibility standards required for the site in the theme for the site, and the person creating the content simply uses the proper heading levels (for example) to make use of those styles.

Emoticons

The emoticon plugin inserts text representations of the emoticons in the content. The emoticon filter is responsible for converting these text sequences into proper smiley images. The emoticon filter is not enabled by default, which is why the emoticon plugin for Atto is not enabled by default.

No-auto link

In general, the more plugins are added to the Atto toolbar, the harder it becomes to find specific plugins. Because the no-auto link plugin is not felt to be widely used it is not enabled by default.

Right to left

Because this plugin is only useful for courses where text needs to be written in a mixture of both "left to right" and "right to left" languages, it is not enabled by default.

Moodle plugins directory

There are more plugins available for Atto than just those included in a default install. See the Moodle plugins directory for additional plugins. Some example plugins include the following:

Cloze editor for Atto

This is a plugin for easily making Embedded Answers (Cloze) question type questions inside the standard Moodle Atto text editor.

Toggle preview

This plugin allows you view the content as it would be seen by a reader.

Chemistry plugins

There are a number of chemistry plugins that support chemistry equations and structures.

Text import plugins

There are a number of plugins that support importing text from other sources. The Paste special plugin minimises the amount of superfluous HTML markup included when pasting content from an external editor such as Microsoft Word.

The Word Import plugin (beta) supports importing an entire Word document, including embedded images.


Equation editor settings

Equation editor commands may be removed, added or reordered in Administration > Site administration > Plugins > Text editors > Atto HTML editor > Equation editor settings.

equationeditor.png

Table editor settings

Styles, colours and sizes for tables and their borders may be enabled from Administration > Site administraton >Plugins > Test editors > Atto HTML editor > Table settings.

See also