Text formats and embedding code

Basic HTML

The text format menu is located beneath the text entry section of your WYSIWYG.The appearance of the WYSIWYG portion of a page or block is controlled by its Text format setting. The setting can be found underneath the WYSIWYG's text entry area. 

By default, the WYSIWYG is set to Basic HTML. This is for two reasons:

  1. Basic HTML provides the feature-rich icon options for text formatting, and;
  2. Basic HTML is available to Contributors and Editors.

Though the Source icon is available, if any non-allowed tags, classes, or IDs (as defined by SiteFarm's Patternlab) are added, these will be stripped out when the page is saved.

Restricted HTML

If the Text format menu is switched to Restricted HTML, it offers a very basic interface with a limited number of permissible HTML tags. Web page addresses and email addresses are turned into links automatically. Restricted HTML is available to Contributors and Editors.

Example of the restricted toolbar displaying bold, italic, bulleted, and numbered list options.



If the Text format menu is switched to Full HTML, the user interface icons go away completely and the screen is turned into a code entry screen instead.

  • Only available to Site Managers due to the need to know how to write HTML and provides a means of securing the page from accidental editing that may interfere with proper HTML syntax structure.
  • Can only use classes and IDs explicitly listed by SiteFarm's Patternlab. Custom classes and IDs must be sub-themed.

Why might you used Full HTML?

The most common reason to switch a page to Full HTML is to include third-party code, such as a Google calendar.

How might you add third-party HTML?

In the example of Google calendar, you could generate the code for the calendar from the specific calendar's Settings. This produces a piece of HTML that looks like this:

<iframe src="https://calendar.google.com/calendar/embed?src=en.usa%23holiday%40group.v.calendar.google.com&ctz=America%2FLos_Angeles" style="border: 0" width="800" height="600" frameborder="0" scrolling="no">

Once a WYSIWYG text format is switched to Full HTML, the above code could be pasted into the text area and the page saved to output a calendar such as what you'll see as follows.