Skip to content

Block Format Plugin

Nicholas Hoyt edited this page Sep 15, 2017 · 14 revisions

Overview

This plugin provides access to various less-common block formats, as opposed to headings and lists.

UI Components

Block Format Menu Button

  • Label: Format
  • Other options for label:
    • Block Format
    • Format Block
    • Paragraph Format
    • Format

Menu

Menu items

  • Block quotation
  • Preformatted text
  • Address
  • --------
  • Normal text
  • Help

Behavior

  • With the exception of the Help item, which opens a dialog box, these behave as toggle buttons, applying and removing the specific block format for the element with the cursor.
  • Toggling a block format off changes the element to:
    • If the element if not contained in another block element, apply the P element
    • If the element is in another block element, just remove the block format tag
  • If a menu item is active (the cursor is in a block corresponding to one of the menu items), a checkmark should appear in the left gutter. Potentially, there could be multiple checkmarks when block formats are nested.
  • 'Normal Text' removes all block formats that are active and changes the outermost element to a P element
  • If the element with the cursor is in a list or table, this operation does not affect the containing list or table markup.

Functionality

Block quotation
  • Use CKEditor functionality from Blockquote plugin
Preformatted text
  • Apply the PRE tag to the context block
Address
Normal text
Help

A11yFirst Help plugin with parameter for block format help

To Do

  • Reach consensus on the functional pieces of this plugin: What are the menu items and what exactly will each one do?
  • Requirements for Preformatted text
  • Requirements for Address