Skip to content

Package UC_FROALA_RTE

The package implements an item-type plug-in interfaces to integrate with Oracle APEX. The package exposes serveral PL/SQL API and package variables allowing configuring the plug-in instances on application and page level.

:::tip PL/SQL API

The package exposes PL/SQL API to be used in APEX development. Learn more about the plug-in PL/SQL functions and procedures.

:::

The plug-in package exposes PL/SQL functions and procedures as the plug-in PL/SQL API. The API documentation is described in the document PL/SQL API.

The package exposes the following constants:

The constant is used to align a toolbar group to left.

c_toolbar_align_left constant varchar2(4) default 'left';

The constant is used to align a toolbar group to right.

c_toolbar_align_right constant varchar2(5) default 'right';

The constant is used to define toolbar buttons for standard screen devices using option toolbarbuttons.

c_toolbar_responsive_sd constant varchar2(4) default 'SD';

The constant is used to define toolbar definition for medium screen devices using option toolbarbuttonsMD.

c_toolbar_responsive_md constant varchar2(2) default 'MD';

The constant is used to define toolbar buttons for small screen devices using option toolbarbuttonsSM.

c_toolbar_responsive_sm constant varchar2(2) default 'SM';

The constant is used to define toolbar buttons for extra small screen devices using option toolbarbuttonsXS.

c_toolbar_responsive_xs constant varchar2(2) default 'XS';

The constant is used to identify the plug-in toolbar group paragraph.

c_toolbar_group_paragraph varchar2(9) default 'PARAGRAPH';

The constant is used to identify the plug-in toolbar group paragraph when configuring third-party integrations or when using plug-in PL/SQL API.

c_toolbar_group_paragraph varchar2(4) default 'TEXT';

The constant is used to identify the plug-in toolbar group paragraph when configuring third-party integrations or when using plug-in PL/SQL API.

c_toolbar_group_paragraph varchar2(4) default 'RICH';

The constant is used to identify the plug-in toolbar group paragraph when configuring third-party integrations or when using plug-in PL/SQL API.

c_toolbar_group_paragraph varchar2(4) default 'MISC';

The constant stores the plug-in collection name used to handle the plug-in session state.

c_coll_name varchar2(9) default 'UC_FROALA';

The constant is used to identify a draft CLOB storing a document HTML in the plug-in collection.

c_clob_type_draft varchar2(5) default 'DRAFT';

The constant is used to identify a on-load CLOB storing a document HTML in the plug-in collection.

c_clob_type_onload varchar2(6) default 'ONLOAD';

The package variables must defined using the plug-in page item attribute Initialization PL/SQL Code or an application component settings Initialization PL/SQL Code. Use the package attributes to configure the plug-in features, and the third-party integrations. The package exposes the following variables:

When variable is set, the plug-in substitution string #DEFAULT_REST_URL_MODULE# is always replaced with the given value.

g_default_rest_url_module varchar2(4000) default null;
begin
UC_FROALA_RTE.g_default_rest_url_module := 'https://example-domain.com/ords/workspacename/customrest/';
end;

When variable is set, the plug-in substitution string #DEFAULT_REST_URL_GET# is always replaced with the given value.

g_default_rest_url_get varchar2(4000) default null;
begin
UC_FROALA_RTE.g_default_rest_url_get := 'https://example-domain.com/ords/workspacename/customrest/display-simple/';
end;

When variable is set, the plug-in substitution string #DEFAULT_REST_URL_GET# is always replaced with the given value.

g_default_rest_url_upload varchar2(4000) default null;
begin
UC_FROALA_RTE.g_default_rest_url_upload := 'https://example-domain.com/ords/workspacename/customrest/upload-simple/';
end;

When variable is set, the plug-in substitution string #DEFAULT_REST_URL_BROWSE# is always replaced with the given value.

g_default_rest_url_browse varchar2(4000) default null;
begin
UC_FROALA_RTE.g_default_rest_url_browse := 'https://example-domain.com/ords/workspacename/customrest/browse-simple/';
end;

When variable is set, the plug-in substitution string #DEFAULT_REST_URL_DELETE# is always replaced with the given value.

g_default_rest_url_delete varchar2(4000) default null;
begin
UC_FROALA_RTE.g_default_rest_url_delete := 'https://example-domain.com/ords/workspacename/customrest/delete-simple/';
end;

The flag enables or disabled the plug-in check if a current APEX schema is REST enabled. When set to true, the plug-in ignores error raised when a current schema is not REST enabled.

g_disable_rest_enabled_check boolean default false;
begin
UC_FROALA_RTE.g_disable_rest_enabled_check := true;
end;

:::note purpose

Disabling check if a current schema is REST enabled might be mandatory when the plug-in RESTful service is outside the plug-in working schema. :::

When set to true the experimental CSS rules are added to a page in order to display multi-level number list preserving parent number as prefix.

g_css_style_multilevel_list boolean default false;
begin
UC_FROALA_RTE.g_css_style_multilevel_list := true;
end;

When set to true the refined toolbar layout is used. To use toolbar layout prior the plug-in 23.2, set this variable to false in the plug-in component settings.

g_toolbar_presets_refined boolean default true;
begin
UC_FROALA_RTE.g_toolbar_presets_refined := false;
end;

When set to true the plug-in checks page item configuration and display error message if page item is not CLOB-enabled. A page item is CLOB-enabled when APEX version is at least 22.2 and page item attribute Session / Data Type is set to CLOB.

g_warn_about_clob boolean default false;
begin
UC_FROALA_RTE.g_warn_about_clob := true;
end;

The supporting process plug-in uses the plug-in PL/SQL variables to assist a developer when updating a document in the database or handling images using PL/SQL code based processes.

When set to true the supporting process plug-in adds UC_FROALA_RTE.g_froala_sqlrowcount := SQL%ROWCOUNT; after a developer’s PL/SQL code given for the supporting process plug-in Update CLOB.

g_update_include_rowcount boolean default false;
begin
UC_FROALA_RTE.g_update_include_rowcount := true;
end;

The variable value is a currently processed image id when using the supporting process plug-ins Delete Removed Images and Process Uploaded Images.

g_froala_image_id varchar2(4000) default null;

The variable value is a currently processed image URL when using the supporting process plug-ins Delete Removed Images and Process Uploaded Images.

g_froala_image_get_url varchar2(4000) default null;

When set to Y, an uploaded image that was removed from a document, can be safely deleted in the database. When set to N, an uploaded image duplicate(s) is still present in a document HTML. The variable must be used with supporting process plug-ins Delete Removed Images.

g_froala_image_safe_to_delete varchar2(1) default null;

:::tip learn more

Learn more about when uploaded images can be safely removed from the database in image handling concept.

:::

When set to Y, a currently processed image was present in a document when page loaded. When set to N, an image was added by end-user after the plug-in initialization. The variable must be used with supporting process plug-ins Process Uploaded Images.

g_froala_image_onload varchar2(1) default null;

Read the plug-in implementation guidelines for Track Changes here.

Enables or disables the third-party integration with Froala Track Changes plug-in.

g_plug_trackchanges_enable boolean default false;
begin
UC_FROALA_RTE.g_plug_trackchanges_enable := true;
end;

The plug-in button is added to the given group. Use the plug-in constants to reference editor toolbar groups:

  • c_toolbar_group_paragraph
  • c_toolbar_group_text
  • c_toolbar_group_rich
  • c_toolbar_group_misc
g_plug_trackchanges_group varchar2(9) default c_toolbar_group_paragraph;
begin
UC_FROALA_RTE.g_plug_trackchanges_group := UC_FROALA_RTE.c_toolbar_group_misc;
end;

The button position in given group.

g_plug_trackchanges_pos integer default 1;
begin
UC_FROALA_RTE.g_plug_trackchanges_pos := 2;
end;

Read the plug-in implementation guidelines for TOAST UI Image Editor here.

When set to true the third-party plug-in is enabled.

g_plug_tui_enable boolean default true;
begin
UC_FROALA_RTE.g_plug_tui_enable := false;
end;

Read the plug-in implementation guidelines for MathType Wiris here.

g_plug_wiris_enable boolean default false;
begin
UC_FROALA_RTE.g_plug_wiris_enable := true;
end;

URL to Math Type JavaScript file.

g_plug_wiris_js varchar2(4000) default null;
begin
UC_FROALA_RTE.g_plug_wiris_js := 'URL_TO_JS_FILE';
end;

Math Type button opening Math Formulas editor is added to the given group. Use the plug-in constants to reference editor toolbar groups:

  • c_toolbar_group_paragraph
  • c_toolbar_group_text
  • c_toolbar_group_rich
  • c_toolbar_group_misc
g_plug_wiris_editor_group varchar2(9) default c_toolbar_group_paragraph;
begin
UC_FROALA_RTE.g_plug_wiris_editor_group := UC_FROALA_RTE.c_toolbar_group_misc;
end;

The button position in given group.

g_plug_wiris_editor_pos integer default 1;
begin
UC_FROALA_RTE.g_plug_wiris_editor_pos := 1;
end;

Defines in which rich text editor toolbar group, the Wiris Math Type Chemistry Formula editor is available to the end-user. Use the plug-in constants to reference editor toolbar groups:

  • c_toolbar_group_paragraph
  • c_toolbar_group_text
  • c_toolbar_group_rich
  • c_toolbar_group_misc
g_plug_wiris_chemistry_group varchar2(9) default c_toolbar_group_paragraph;
begin
UC_FROALA_RTE.g_plug_wiris_chemistry_group := UC_FROALA_RTE.c_toolbar_group_misc;
UC_FROALA_RTE.g_plug_wiris_chemistry_pos := 2;
end;

Math Type Wiris button chemistry formula editor position in the rich text editor group defined using g_plug_wiris_chemistry_group.

g_plug_wiris_chemistry_pos integer default 1;
begin
UC_FROALA_RTE.g_plug_wiris_chemistry_pos := 2;
end;

Read the plug-in implementation guidelines for WProofreader Text Checker here.

When set to true the third-party plug-in is enabled

g_plug_spellcheck_enable boolean default false;
begin
UC_FROALA_RTE.g_plug_spellcheck_enable := true;
end;

URL to WProofreader Text Checker JavaScript file

g_plug_spellcheck_js varchar2(4000) default null;
begin
UC_FROALA_RTE.g_plug_spellcheck_js := 'https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js';
end;

Valid license key.

g_plug_spellcheck_api varchar2(4000) default null;
begin
UC_FROALA_RTE.g_plug_spellcheck_api := 'API_KEY';
end;

Default language to be checked. The possible values are described in WProofreader Text Checker JavaScript API for option lang

g_plug_spellcheck_lang varchar2(4000) default 'en_US';
begin
UC_FROALA_RTE.g_plug_spellcheck_lang := 'pl';
end;

Default UI language. The possible values are described in WProofreader Text Checker JavaScript API for option ui_lang

g_plug_spellcheck_ui_lang varchar2(4000) default 'en';
begin
UC_FROALA_RTE.g_plug_spellcheck_ui_lang := 'pl';
end;

The WProofreader Text Checker theme. The possible values are described in WProofreader Text Checker JavaScript API for option theme

g_plug_spellcheck_theme varchar2(4000) default 'gray';
begin
UC_FROALA_RTE.g_plug_spellcheck_theme := 'gray';
end;

When set to true the badge let users open the WProofreader settings directly from the rich text editor.

g_plug_spellcheck_badge_enable boolean default true;
begin
UC_FROALA_RTE.g_plug_spellcheck_badge_enable := false;
end;

When set to true the badge let users change language in badge menu. The possible values are described in WProofreader Text Checker JavaScript API for option enableLanguagesInBadgeButton.

g_plug_spellcheck_badge_lang boolean default true;
begin
UC_FROALA_RTE.g_plug_spellcheck_badge_lang := false;
end;

Read the plug-in implementation guidelines for CODOX.io here.

When set to true the third-party plug-in is enabled.

g_plug_codox_enable boolean default false;
begin
UC_FROALA_RTE.g_plug_codox_enable := true;
end;

URL to CODOX.io JavaScript file.

g_plug_codox_js varchar2(4000) default null;
begin
UC_FROALA_RTE.g_plug_codox_js := 'CODOX_URL_JS';
end;

URL to CODOX.io CSS file.

g_plug_codox_css varchar2(4000) default null;
begin
UC_FROALA_RTE.g_plug_codox_css := 'CODOX_URL_CSS';
end;

Valid license key.

g_plug_codox_api varchar2(4000) default null;
begin
UC_FROALA_RTE.g_plug_codox_api := 'CODOX_API_LICENSE_KEY';
end;

The current user name used to identify a user while collaborating.

g_plug_codox_username varchar2(4000) default null;
begin
UC_FROALA_RTE.g_plug_codox_username := apex_application.g_user;
end;

The unique rich text document ID used to handle collaboration on same file.

g_plug_codox_document_id varchar2(4000) default null;
begin
UC_FROALA_RTE.g_plug_codox_document_id := apex_util.get_session_state('P1_DOCUMENT_ID');
end;