Jump to content

The Editor: Difference between revisions

From Swarthmore Knowledge Base
Kwhiteb1 (talk | contribs)
Kwhiteb1 (talk | contribs)
Line 43: Line 43:
}}
}}


== 2.3) Bold / Italics / Bullet List / Ordered List ==
== 2.3 Bold, Italics, Bullet Lists, and Numbered Lists ==


Allows you to add bold and italics content as well as bullet and ordered lists.
The editor toolbar includes tools for applying '''bold''' and ''italic'' formatting, as well as creating bulleted and numbered lists.


=== A Note About Lists ===
=== Choosing the Right Type of List ===


There are two kinds of lists - bulleted and numbered lists and they serve different purposes.
Drupal supports two types of lists, each intended for a different purpose.


Numbered lists should be used when the order of completion is important. For example, if you are doing a reverse sear on a steak, you need to slow cook the steak before you but it on high heat to sear the outside. The list would look something like this:
'''Numbered lists''' should be used when the order of the items matters, such as instructions or procedures.


# Heat the oven to 250 F;
Example:
# Dry the steak surface and add any seasonings like salt and/or pepper;
# Place the steak in an oven proof pan for 15-20 minutes. You’ll want the steak to be about 30 degrees lower than the desired serving temperature;
# Sear the steak. Put it on a hot grill or in a hot skillet. Cook for 1-2 minutes on each side and 30-60 seconds on the sides;
# Baste with butter and add aromatics;
# Let it rest for 5-10 minutes;
# Serve
# Congratulate yourself on cooking a most delectable steak.


A bulleted list is used when it doesn’t matter what comes first or last. A simple example might be a packing list:
# Heat the oven to 250°F.
# Season the steak.
# Cook in the oven until nearly done.
# Sear each side over high heat.
# Let the steak rest.
# Serve.


* charging cords and plugs;
'''Bulleted lists''' should be used when the order of the items is not important, such as checklists or collections of related items.
* socks;
 
* shirts;
Example:
* slacks;
 
* toiletries and medications;
* Charging cables
* extra pair of eye glasses;
* Socks
* Shirts
* Toiletries
* Prescription medications
* Extra pair of glasses
 
{{Callout|type=tip|title=Best Practice|
Choose the list type based on its purpose. Use '''numbered lists''' for step-by-step instructions and '''bulleted lists''' for unordered collections of related items.
}}


== 2.4) Headings ==
== 2.4) Headings ==

Revision as of 17:44, 9 July 2026

This section introduces the Drupal content editor, where you'll create and format the main content of your webpages. Each tool in the editor toolbar is explained in the sections that follow, along with recommended best practices for creating accessible, well-formatted content.

2. Working with the Editor

The body field contains the main content that appears on a webpage. The editor toolbar appears above the body field and includes tools for formatting text, adding headings, creating links, inserting tables, adding images, and editing HTML source.

Screenshot of the body editor in Swarthmore's Drupal 10 CMS.
Figure: The body editor contains the main page content and formatting toolbar.

The editor functions are shown below.

Screenshot of the Drupal editor toolbar with formatting, link, table, image, source, and fullscreen controls.
Figure: The Drupal editor toolbar includes the main tools used to format and manage body content.

From left to right, the editor toolbar includes:

  1. Undo / Redo
  2. Remove Formatting
  3. Bold, Italics, Bullet List, Ordered List
  4. Headings
  5. Styles
  6. Horizontal Rule
  7. Anchors
  8. Links
  9. Special Characters
  10. Find / Replace
  11. Tables
  12. Add Image in Body Copy
  13. Upload Image
  14. View HTML Source
  15. Toggle Full Screen

2.1) Undo | Redo

Allows you to undo or redo any edit you make to the body copy block.

2.2 Remove Formatting

When you copy and paste content from another source (Google Docs, Microsoft Word, PDFs, or a website) the original formatting (fonts, colors, font sizes, spacing, and other styles) is often copied along with the text. This formatting may not match the design of the Swarthmore website.

The Remove Formatting tool strips away the imported formatting while preserving the text itself. To use it, highlight the text you want to clean up and click the Remove Formatting button in the editor toolbar.

Best Practice

Always use Remove Formatting after pasting content into Drupal. This helps ensure your content uses the site's standard styles and remains consistent with the rest of the website.


2.3 Bold, Italics, Bullet Lists, and Numbered Lists

The editor toolbar includes tools for applying bold and italic formatting, as well as creating bulleted and numbered lists.

Choosing the Right Type of List

Drupal supports two types of lists, each intended for a different purpose.

Numbered lists should be used when the order of the items matters, such as instructions or procedures.

Example:

  1. Heat the oven to 250°F.
  2. Season the steak.
  3. Cook in the oven until nearly done.
  4. Sear each side over high heat.
  5. Let the steak rest.
  6. Serve.

Bulleted lists should be used when the order of the items is not important, such as checklists or collections of related items.

Example:

  • Charging cables
  • Socks
  • Shirts
  • Toiletries
  • Prescription medications
  • Extra pair of glasses
Best Practice

Choose the list type based on its purpose. Use numbered lists for step-by-step instructions and bulleted lists for unordered collections of related items.


2.4) Headings

Allows you to add headings to your content. All webpages follow a standard convention of ranking of headings from H1 to H6. The Page Title (the most important element) is the H1. If you include heading/subheadings in the page content, you would start with H2 and then use H3-H6 for additional sub-headings.


2.5) Styles

The styles drop down menu allows you apply custom font styles to your content. This is useful if you wish to include lead paragraphs (slightly larger font size for the intro paragraph) or pull quotes (a quote pulled from the content) to your body content.

2.6) Horizontal Rule

Allows you to add a horizontal rule to your content.

2.7) Anchors

Anchor are internal links within the body content of a page that allow you jump to a section of the page. Anchors are typically placed at the beginning of the section heading or paragraph that you want visitors to jump to.

The only requirement is to add a name for the anchor - the name should be one word and contain no spaces. Examples of good anchor names are:

  • CreatingAnchors
  • admissionsRequirements
  • required-documents

You will know you've successfully created an anchor when you see a red flagSmall icon of a red flag waving in the windappear in the Copy Editor. This red flag will not be visible to the public and is intended to help remind you of its presence while editing. Clicking on the red flag will display the anchor tag id. If you need to edit the anchor name, you can click on that flag and the Anchor dialog will reopen.


2.8) Links

Adding links to other webpages or other content is one of the most common tasks you’ll be doing when creating webpages. The most important think to remember about a link is the text of that link. Make sure it is meaningful and lets a visitor know a little about what will happen when they visit that link. Visit Unlock the Power of Meaningful Links to learn more. Here are some examples of informative and uninformative link text:

Ineffective Effective
WCAG-compliant links should explain their purpose for the link text alone. Click here to learn more. WCAG-compliant links should explain their purpose from the link text alone.
Check your contrast levels using https://webaim.org/resources/
contrastchecker/
Check your contrast levels using WebAim’s  Contrast Checker
Swarthmore’s Accessibility website includes five tips for preparing accessible materials Swarthmore’s Accessibility website includes five tips for preparing accessible materials
Here is an introduction from WebAIM to links and hypertext WebAIM’s introduction to links and hypertext
10 minute conversation How to have a 10 minute conversation [PDF]

2.8.1) Linking to another webpage in Drupal

  1. Highlight the text you wish to become a link
  2. Click the the chain icon in the menu bar. This will open the link editor window

Screenshot diagram of how to create a link in Drupal's CKeditor page editor tool

2.8.2 How the Link Editor Works

  1. Link URL - is where you would add the link or URL.
  2. Link to a Document - if linking to a document (hosted in Drupal) then you click this button.
  3. Advanced - opens/collapses the advanced tab which includes: CSS Classes, ID, and Open in a new window.
  4. Open in a new window - allows you to toggle whether the link should open in a new tab or not. The default setting is have the link open the same window/tab.
  5. Save / Cancel - click the check mark to save your edits or the x to cancel


Screenshot diagram of the components making up the insert url popup in Swarthmore's Drupal 10 body editor

2.8.3 Creating a link to another page in Drupal

  1. Start typing the name of the webpage you wish to link to. For example, if you wanted to link to the “Admissions & Aid” homepage, you would type “Admissions” and every page in Drupal that has the word “Admissions” in it’s title would appear in the list below.
  2. Select the webpage you wish to link to.

Screenshot demonstrating the link to page dropdown on Swarthmore's Drupal 10 instance

  1. After selecting the page you wish to click to, the link editor will switch back the minimized view. In place of the page name, you will see a reference like this /node/######. This is normal. This is how Drupal keeps track of internal links.
  2. Click the checkmark to save your changes or the X to cancel.

Screenshot diagram of how to save a newly inserted link in Drupal 10

2.8.4 Creating a link using an URL

  1. Link URL - You can also simply copy and paste any URL into the field. This includes both external links, internal links, Google drive links, etc.

Screenshot indicating link url in the Drupal 10 instance at Swarthmore

2.8.5 Linking to a document

  1. You add a link to a document. Select the text you wish to become a link. Always include the file type to let people know that the link points to a file and not a website. For example, add [pdf] for a pdf file.

Screenshot indicating how to link to a document in Drupal 10

  1. Click the Link to Document Button to add a new document (or select) a existing document that has been previously uploaded to Drupal
  2. It is recommended always have PDFS (or other documents) open in a new tab. You can control whether a link opens in a new tab, by clicking the Advanced tab
  3. Under the Advanced tab, slide the toggle to green to have the link open in a new window.

Screenshot indicating the button to insert a document in a Drupal 10 link

How the “Link to Document” works

Clicking the Link to Document Button will open a new window that allows you upload a new document to Drupal or select an existing document.

  1. Select Document - will display all the documents that has been previously uploaded into Drupal
  2. Upload Document - will allow you upload a new document
  3. Filename - lets you search the documents folder
  4. Name - allows you sort the folder by filename
  5. Created - allows you sort the folder by when it was uploaded.
  6. Radio Button- choose the the file you wish make become a link.
  7. Select Document - save your choice. You will then be returned to the previous window.

Screenshot diagramming the link to a document modal window

Once the document is selected:

  1. The name of the file you selected will appear in the Link URL field
  2. Click the green check mark to add the link in Drupal.

Screenshot indicating how to save a link to a document in drupal 10

2.8.6 Edit or remove a link

  1. To edit or remove a link, click the link. The link editor window will appear.
  2. You can select the pencil icon to edit an existing link
  3. Or the paperclip X icon to remove the link.

Screenshot diagramming how to edit a previously created link in Drupal 10

2.9) Special Characters

This function allows you to add special characters (a,e,i,o,u with accents and other marks). This is most common for foreign words and names that might appear on the site

Screenshot of the special characters popup window

2.10) Find & Replace

Allows you to do a standard find and replace in the body content block.

2.11) Tables

Use this function to add table content to your webpage. Ideally, tables are created to share data e.g. dates and times of a train schedule. Avoid using tables to control look and feel.

  1. You first select the number of rows and columns using the matrix. Remember to include a column or row for table headings (see WebAims article on tables to learn more.)

Screenshot of the rows and columns matrix creating tool in Drupal 10 editor

  1. Add your column or row headings.
  2. Then you add your data.

Screenshot showing how to add data to a table in the Drupal 10 editor


2.12) Add Image

Visit 6.2) Adding an Image in the Body Copy to learn more about adding an image to the body copy

2.13) Upload Image

Allows you upload images directly to Drupal.

2.14) HTML Source

Clicking the HTML Source button will display the underlying HTML responsible for rendering the text formatting, links, images, and other elements that appear on the page. Editors who are comfortable working with HTML may find this functionality useful for troubleshooting, however it is not necessary for the general editing of content.

2.15) Full Screen

The Full Screen button will maximize the Copy Editor to take up the full browser window. This can be useful when working with a large amount of content or as a means of cutting down on distraction during the writing process.

Click the button a second time in order to minimize the Copy Editor, returning it to its original size.