Note: You are currently viewing documentation for Moodle 2.4. Up-to-date documentation for the latest stable version of Moodle may be available here: Formatting text.

Formatting text: Difference between revisions

From MoodleDocs
(Grrr, demo.moodle only has HTML format, see page comments NEED HELP)
(See talk, after I review the notes for this page, will fix imagesin a bit)
Line 2: Line 2:
<p class="note">'''Please refer to [[Page_notes#Formatting text|these notes]] before editing this page.'''</p>
<p class="note">'''Please refer to [[Page_notes#Formatting text|these notes]] before editing this page.'''</p>


Formatting text can refer to the electronic typesetting of characters or the layout of a content area. The HTML editor has tools that can assist you with both.  Please refer to the [[HTML editor]] page for more information about each of the tools. 


When writing text in Moodle there are several formats you can choose to produce your text, depending on your expertise and the type of browser you are using. Select the format by using the pulldown menu which is part of the HTML editor tool, located below the area where you enter text.   
Most people will format text using the HTML editor in the non HTML code mode ([http://en.wikipedia.org/wiki/WYSIWYG WYSIWYG]). The HTML editor has many common word processing tools and thus is familiar.  Here are a few that are the most basic.   


Usually you can just leave this setting to the default value and things should work as you expect.
==Font family, size, format style==


Select the format by using the pulldown menu which is part of the [[HTML editor]] tool, located below the area where you enter text.
[[File:HTML_editor_group_font_style|thumb|center| The basic font, size format group]]
<gallery>
File:HTML editor font family
File:HTML editor font size
File:HTML editor format
</gallery>


==Moodle auto-format==
:''Tip:'' Remember that different browsers may produce different looking formats of the same content area in Moodle.


This format is best for when you are using normal web forms for entry (instead of the Richtext HTML editor). Just type text normally, as if you were sending an email.


When you save your text, Moodle will do a number of things to automatically format your text for you.
==Format styles==
*Paragraph
*Address format
*Preformatted format
*Headings


In Moodle 1.x, anything starting with www. or http:// will automatically be turned into a clickable link, for example [http://www.moodle.org www.moodle.org]. Since Moodle 2.0, the administrator has to enable this feature via [[Convert URLs into links]] filter.
==HTML editor auto-format==
 
When you save your text, the HTML editor may automatically apply special formats to your text. For example it may convert <nowiki>http://moodle.org</nowiki> to a hyperlink, if the site has[[Convert URLs into links]] turned on.
Your line breaks will be retained, and blank lines will start new paragraphs.


Smiley characters such as :-) will automatically become their graphical equivalents in Moodle 1.x. Since Moodle 2.0, the administrator has to enable [[Display emoticons as images]] filter.
Smiley characters such as :-) will automatically become their graphical equivalents in Moodle 1.x. Since Moodle 2.0, the administrator has to enable [[Display emoticons as images]] filter.


[[Image:Smilies.png]]
As with most word processors, using the enter key to insert a blank line, will automatically start a new paragraph.


You can even embed HTML code if you want to and it will be retained.
Many hot keys are available, instead of using the icon on the tool bar. For example, block text so it is highlighted and pressing Ctrl+b will change the text to''' bold'''.  Put your mouse pointer over an icon, without clicking, on the HTML editor to discover the description and the hot key for that function.


==HTML format==
[[Image:Html tags.png]]
[[Image:Html tags.png]]
 
Some users are comfortable in formatting directly in HTML code.  The HTML editor allows this option.  Novice users can use this option to see how the HTML editor
==HTML format==
 
When writing HTML in Moodle, you are free to use almost any HTML tags you like to produce the effect you want.
 
Note that scripting (eg Javascript or VB Script) is not allowed, and will be removed automatically.
 
Your code will normally be printed on the page within a table cell, so:


* There is no need to use any <HEAD> or <BODY> tags
* There is no need to use any <HEAD> or <BODY> tags
* Be careful about unmatched </TABLE> tags that may mess up the display.
* Visual Basic and other codes may not work. Please see [[JavaScripts]] and [[Multimedia plugins]] for more information about inserting these into the content area.
 
In Moodle 1.x, smilies (emoticons) will be converted into their graphical equivalent, and bare URLs will be converted into links (as for Moodle auto-format). Since Moodle 2.0, the administrator has to enable these features via filters.
 
This format assumes the text is pure HTML. If you are using the HTML editor to edit text then this is the default format - all the commands in the toolbar are producing HTML for you.
 
Even if you are not using the HTML editor, you can use HTML code in your text and it should come out exactly as you intended.
 
Unlike the Moodle auto-format, no automatic formatting is performed.
 
==Plain text format==
 
This format is useful when you need to include lots of code or HTML that you want to be displayed exactly as you wrote it.
 
It still translates spaces and new lines, but otherwise your text isn't touched.
 
==Markdown text format==
 
[[Markdown]] format tries to make it easy as possible to type well-formatted XHTML pages using nothing but text written more or less like you would write an email.
 
It's very good for writing clean text pages with some headings and some lists but without many links or images. It is an excellent choice when accessibility of the generated page is important.
 
An unordered list may be created with asterisks (*).


For complete syntax description, see: http://daringfireball.net/projects/markdown/syntax Moodle 1.6 has extended features called Markdown Extra: for ''additional'' features see http://www.michelf.com/projects/php-markdown/extra/


==Tips and Tricks==
==Tips and Tricks==

Revision as of 14:25, 23 August 2011

Please refer to these notes before editing this page.

Formatting text can refer to the electronic typesetting of characters or the layout of a content area. The HTML editor has tools that can assist you with both. Please refer to the HTML editor page for more information about each of the tools.

Most people will format text using the HTML editor in the non HTML code mode (WYSIWYG). The HTML editor has many common word processing tools and thus is familiar. Here are a few that are the most basic.

Font family, size, format style

Select the format by using the pulldown menu which is part of the HTML editor tool, located below the area where you enter text.

File:HTML editor group font style
The basic font, size format group
Tip: Remember that different browsers may produce different looking formats of the same content area in Moodle.


Format styles

  • Paragraph
  • Address format
  • Preformatted format
  • Headings

HTML editor auto-format

When you save your text, the HTML editor may automatically apply special formats to your text. For example it may convert http://moodle.org to a hyperlink, if the site hasConvert URLs into links turned on.

Smiley characters such as :-) will automatically become their graphical equivalents in Moodle 1.x. Since Moodle 2.0, the administrator has to enable Display emoticons as images filter.

As with most word processors, using the enter key to insert a blank line, will automatically start a new paragraph.

Many hot keys are available, instead of using the icon on the tool bar. For example, block text so it is highlighted and pressing Ctrl+b will change the text to bold. Put your mouse pointer over an icon, without clicking, on the HTML editor to discover the description and the hot key for that function.

HTML format

Html tags.png Some users are comfortable in formatting directly in HTML code. The HTML editor allows this option. Novice users can use this option to see how the HTML editor

  • There is no need to use any <HEAD> or <BODY> tags
  • Visual Basic and other codes may not work. Please see JavaScripts and Multimedia plugins for more information about inserting these into the content area.


Tips and Tricks

  • Wrong Characters Showing - If some users do not see the same characters or figures, have them check their browser settings for their character settings. At Moodle.org, the recommended default character decoding set is UTF-8. On a Firefox browser, this can be found in Tools>Options>Fonts & colors>advanced>default character decoding pull down menu.

If that doesn't work you can try installing a UTF-8 Unicode font from: http://titus.fkidg1.uni-frankfurt.de/unicode/tituut.asp. (This has at least helped XP users that weren't seeing stars in the ratings.)