Skip to main content

Standard attributes

The plug-in uses the following standard attributes exposed in the APEX page designer:

  • Has "Page Items to Submit" Attribute
  • Has "Initialization JavaScript Code" Attribute
  • Has "CSS Class" Column Attribute
  • Has "Custom Attributes" Column Attribute

Advanced

Initialization JavaScript Code

The attribute value must be an anonymous function that accepts only one parameter, a JSON object containing all the options rendered from the AOE Editor package on a page load. The function must return a JSON object to initialize and customize the AOE Editor.

The default value is presented below but does not include all available options.

function( pOptions ) {
pOptions.flushUiPreferences = true;
pOptions.showStatusBar = true;
pOptions.showSidebar = false;
pOptions.showRuler = true;
pOptions.hideMenu = false;
pOptions.classicMenu = false;
pOptions.logPrefixAsStaticId = true;
pOptions.height = "70vh";
pOptions.zoomLevel = 8;
pOptions.darkMode = false;
pOptions.hidePoweredBy = false;

return pOptions;
}

logPrefixAsStaticId

A Boolean flag determines whether the AOE Editor produces JavaScript logs (in application debug mode) using the region static ID as a prefix or using the default prefix. Enabling this property is helpful when debugging multiple instances of the AOE Editor on the same page.

function( pOptions ) {
pOptions.flushUiPreferences = true;
}

height

The CSS height value is applied to the AOE region.

function( pOptions ) {
pOptions.height = "70vh";
}

zoomLevel

A Number from 1 to 20. Each zoom level maps to a different initial zoom-in percentage.

The list of zoom levels to be used is listed below:

  • level 1 = 20%
  • level 2 = 25%
  • level 3 = 30%
  • level 4 = 35%
  • level 5 = 40%
  • level 6 = 50%
  • level 7 = 60%
  • level 8 = 70%
  • level 9 = 85%
  • level 10 = 100%
  • level 11 = 120%
  • level 12 = 150%
  • level 13 = 170%
  • level 14 = 200%
  • level 15 = 235%
  • level 16 = 280%
  • level 17 = 335%
  • level 18 = 400%
  • level 19 = 400%
  • level 20 = 400%

hidePoweredBy

A Boolean flag that determines whether the AOE logo is displayed in the new file panel.

darkMode

A Boolean flag that determines whether the AOE editor theme is dark or light.

flushUiPreferences

A Boolean flag that determines whether the end-user UI preferences are flushed before loading the editor. Flushing the end-user's preferences is required to force the editor UI to use showStatusBar, showSideBar, and showRuler.

showStatusBar

A Boolean flag that determines whether the editor's status bar is visible. If set to true the editor's status bar is displayed, otherwise, the status bar is hidden.

If the end-user customizes the editor using the editor's toolbar, the end-user preferences are forced unless the preferences are flushed with flush Preferences.

showSidebar

A Boolean flag that determines whether the editor's sidebar is visible. If set to true the editor's sidebar is displayed, otherwise, the sidebar is hidden.

If the end-user customizes the editor using the editor's toolbar, the end-user preferences are forced unless the preferences are flushed with flush Preferences.

showRuler

A Boolean flag that determines whether the editor's ruler is visible. If set to true the editor's ruler is displayed, otherwise, the ruler is hidden.

If the end-user customizes the editor using the editor's toolbar, the end-user preferences are forced unless the preferences are flushed with flush Preferences.

classicMenu

A Boolean flag that determines whether the editor menu layout is tabbed or classic.

hideMenu

A Boolean flag that determines whether the document editor menu is displayed.

checkEditorTimeout

A number of Milliseconds defining a delay in starting the first countdown defined via the checkEditorCountdowns property.

function( pOptions ){
pOptions.checkEditorTimeout = 5000;
}

checkEditorCountdowns

An Array of Seconds defining the countdown's starting value. When a countdown ends, the AOE editor iframe is reloaded, creating a new request to load a document. Every array entry is a separate countdown. The entries number defines how many countdowns have to finish before AOE gives up and raises an error on initializing the editor.

These countdowns reinitialize the request to load a document when the AOE server iframe is not loaded when requested.

function( pOptions ){
pOptions.checkEditorCountdowns = [1, 1, 90, 30, 60];
}

checkDocTimeout

A number of Milliseconds defining a delay in starting the countdown defined via the checkDocCountdown property.

function( pOptions ){
pOptions.checkDocTimeout = 5000;
}

checkDocCountdown

A number of Seconds defining a countdown's starting value before AOE gives up and raises an error on document load.

This countdown informs the end-user that the AOE server failed to load a document after loading its iframe.

function( pOptions ){
pOptions.checkDocCountdown = 30;
}

textCreateDisabled

A string to be displayed when the Settings \ Disable Creating Files attribute is checked and no document is loaded. If not set, the default string "Load a document to edit it." or the translation message UC_AOE_UI_PROMPT_MSG_CREATEDISABLED is displayed.

This option is useful when the AOE editor instance shouldn't be using a common message.

function( pOptions ) {
pOptions.textCreateDisabled = "Creating files is disabled, please load the existing document.";
}

textReadonly

String to be displayed when the Read-Only attribute returns true and no document is loaded. If not set, the default string "Load a document to preview it." or the translation message UC_AOE_UI_PROMPT_MSG_READONLY is displayed.

This option is useful when the AOE Editor instance shouldn't be using a common message.

function( pOptions ) {
pOptions.textCreateDisabled = "Please load the existing document to preview it. Editing documents is disabled.";
}

Item(s) to submit

AOE supports the Item(s) to submit region attribute. Whenever an AOE region is refreshed the given item values are stored in APEX Session State.

Read Only

AOE supports the Read Only region attribute. Whenever the attribute is true the editor is used to display documents without the possibility to modify a document.

The region attribute evaluation is superior to the evaluation of a custom function returning document permissions. For example, if the attribute Read-Only is set to Always and a custom function's results allow the current end-user to modify the requested file, the editor is run in read-only mode.