Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

Text formats are composed of a series of filters and change how HTML tags are processed and displayed on your site. When a user creates content, the text format is associated with the content, and the full, original text is stored in the database. The content is then passed through filters in the text format before it becomes output on the site.

Each text format is associated with a visual WYSIWYG (What You See Is What You Get) HTML editor. The core Text Editor gives you the ability to configure the editors (such as adding and removing buttons from their toolbars). The core CKEditor module provides you with the industry-standard known as CKEditor, so it can be used to modify HTML content on your site.

There are three different editing modes you can use for CKEditor, Basic HTML, Restricted HTML, and Full HTML text formats. Each text format has an associated permission, so that you can pick and choose what user can use which text format. This filters certain users from using Basic HTML, which filters out dangerous HTML tags.

Basic HTML

Basic HTML provides the ability to add some basic text formatting to your document. When enabled, it adds the Bold, Italic, Styles, Horizontal Rule Line and Linking toolbar buttons that apply these styles.

If you want to remove basic styles from your document, you can also use the Remove Format button to remove these styles. You can also insert and remove a Numbered List or a Bulleted List as well in this mode. Adding Files, Images, or Block Quotes are also available to you. With the Source button, you can quickly switch between Basic HTML mode to Source code mode, where you can hardcode your HTML tags manually.

Restricted HTML

The Restricted HTML mode allows you to use raw HTML tags in your document. When the editor is initialized in this mode, the user can only edit the content within the regions chosen by the user in the standard editing mode.

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>

  • Lines and paragraphs break automatically.

  • Web page addresses and email addresses turn into links automatically.

Full HTML

With Full HTML mode you can edit entire HTML pages (from <html> to </html>), including the page metadata like DOCTYPE, character set encoding, meta tags, text and background colors, or margins.

When Full HTML is enabled, the button is automatically added to the toolbar. Once clicked, it opens up the document properties dialog window where you are then able to manipulate document metadata.

  • Lines and paragraphs are automatically recognized. The <br /> line break, <p> paragraph and </p> close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple of blank lines.

  • Web page addresses and email addresses turn into links automatically.

  • You can align images, videos, blockquotes and so on to the left, right or center. Examples:

    • Align an image to the left: <img src="" data-align="left" />

    • Align an image to the center: <img src="" data-align="center" />

    • Align an image to the right: <img src="" data-align="right" />

    • … and you can apply this to other elements as well: <video src="" data-align="center" />

  • You can caption images, videos, blockquotes, and so on. Examples:

    • <img src="" data-caption="This is a caption" />

    • <video src="" data-caption="The Drupal Dance" />

    • <blockquote data-caption="Dries Buytaert">Drupal is awesome!</blockquote>

    • <code data-caption="Hello world in JavaScript.">alert("Hello world!");</code>

Embed

With Embed, you can enter your content in the Text field. For the best results, remove all existing formatting before copying and pasting into this field.

Embed will include the entire HTML needed to display the resource in the data.

Award Format

Like Embed, Award format allows you to enter your content in the Text field.

  • Allowed HTML tags: <a href> <em> <strong> <ul> <ol> <li> <table id class> <tbody> <td colspan> <tfoot> <th colspan> <thead> <tr> <caption> <col> <colgroup> <span> <hr> <p> <br>

Field of Interest Format

CKEditor allows HTML content. Learning all of the HTML may feel intimidating, but learning a small number of the most basic HTML tags is very easy to learn.

Like Award Format, there are several basic HTML tags that you can add to your document.

  • Allowed HTML tags: <a href> <em> <strong> <ul> <ol> <li> <table id class> <tbody> <td colspan> <tfoot> <th colspan> <thead> <tr> <caption> <col> <colgroup> <span> <hr> <p> <br>

  • No labels