Skip to main content

Example layouts

This document covers example implementations showcasing various toolbars resembling well-known products used by millions of users around the world. The JavaScript code listed next to the example preview can be copied and pasted into the standard APEX page item attribute Initialization JavaScript Code.

Document ready

The example presents the editor's toolbar configured to resemble the Google Documents toolbar. The toolbar is using two groups paragraph and misc positioning buttons to the left and right side of the toolbar. To give the editor document's editor look, the option documentReady is enabled.

Features:

  • The Google Documents toolbar looks
  • the number of visible buttons changes while a browser is resized
  • the exposed buttons change, for example, undo and redo buttons are not visible for smaller widths
  • when the browser width is below 768px the toolbar buttons are re-organized into two rows of toolbar

Calendar

The example presents the editor's toolbar configured to resemble the Google Calendar toolbar. The toolbar definition is a simple array of 7 buttons and two separators.

Features:

  • The Google Calendar toolbar looks
  • Simple to implement

image-20240517121413574

Inline toolbar

The example presents editor's toolbar configured using toolbarInline and toolbarVisibleWithoutSelection to be shown only when the text in a document is selected or when the end-user presses keyboard shortcut CTRL+E.

Features:

  • Toolbar for visible for selected text only
  • Shortcut to open toolbar on demand
  • Intuitive UX when editing CLOB values embedded directly in the APEX application
info

Using option toolbarInline makes the editor borderless and background-color less, which requires additional CSS configuration to make the editor present well in the Oracle APEX application. The example implementation relies on the native Oracle APEX region template content block. See the tab Content Block Options below.

E-mail

The example presents the editor's toolbar configured to resemble the Google Gmail toolbar available when composing a new e-mail. The toolbar is displayed below the editor using option toolbarBottom.

Features:

  • The toolbar is positioned at the bottom
  • The Google Gmail toolbar looks
  • Responsive toolbar