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.

Below are the available options and their default values:

OptionsDefault Value
logPrefixAsStaticIdfalse
height"70vh"
zoomLevel8
hidePoweredByfalse
hideBrandingfalse
menuHideAOPfalse
darkModefalse
flushUiPreferencestrue
showStatusBartrue
showSidebarfalse
showRulertrue
classicMenufalse
hideMenufalse
checkEditorTimeout5000
checkEditorCountdowns[1, 1, 90, 30, 60]
checkDocTimeout5000
checkDocCountdown30
textCreateDisabled"Load a document to edit it."
textReadonly""
wopiSRCqueryParameters{}
_formTargetBlankfalse

Example for usage of above options in APEX Office Edit(AOE)

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.

hideBranding

Boolean flag determining whether the AOE logo is displayed in "read-only", "creating file disabled" and "loading" panel. If this is set, then AOE branding will be removed from iframe being used to render the document. Items that are removed when hide branding is set.

  • Icon on top left
  • AOE Online Help tool item of Help tab
  • About tool item of Help tab

Boolean flag determining whether the AOP menu item is displayed.

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.";
}

_formTargetBlank

Setting this wopi attribute will open the document iframe that renders the document in new tab. Be sure to enable/allow pop-up from the page.

wopiSRCqueryParameters

The wopi attributes that needs to be sent to AOE server. We can use this options to set the default language, customize the layout of the editor and so on.

Setting default language.

You can provide a key name lang in wopiSRCqueryParameters option of pOptions as:

  pOptions.wopiSRCqueryParameters = {
"lang": "nl" // for dutch.
};

This feature will attempt to convert all text in the menu bar and subsequent text to their respective languages.

Everything may not be as expected.

However, not all languages are currently supported, and some text may not be converted to your language as expected.

Supported Language, their codes and translated texts
Language Language Code Translated
English en 100%
Dutch nl 100%
Hebrew he 100%
Hungarian hu 100%
Japanese ja 100%
Polish pl 100%
Portuguese pt 100%
Portuguese (Brazil) pt_BR 100%
Spanish es 100%
Turkish tr 100%
Czech cs 99%
English (Australia) en_AU 99%
English (New Zealand) en_NZ 99%
English (South Africa) en_ZA 99%
English (United Kingdom) en_GB 99%
Slovenian sl 99%
Welsh cy 99%
Croatian hr 99%
Basque eu 98%
German de 98%
Swedish sv 98%
Chinese (Simplified) zh_Hans 97%
Ukrainian uk 97%
Albanian sq 96%
French fr 94%
Russian ru 93%
Icelandic is 90%
Indonesian id 89%
Vietnamese vi 87%
Arabic ar 87%
Catalan ca 86%
Italian it 85%

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.