Modifying the Rich Text Editor User Interface

The rich text editor extends the capabilities of a long edit box to display rich text or editable rich text at runtime.

This example illustrates an editable rich text-enabled long edit box at runtime.

Runtime long edit box showing rich text functionality

The rich text editor enables you to add rich formatting of text content, including common structural treatments such as lists; formatting treatments such as bold, underline, and italic text; drag-and-drop inclusion; paste-as-text; and sizing of images. The rich text editor toolbar is extensible through the use of HTML definitions that define your configuration, which enables you to design and implement an interface that is specific to the needs of your users.

Important! Use caution when modifying the rich text editor interface; it is recommended that you never include or enable the Source button in the toolbar.

PeopleTools 8.60 currently supports CKEditor v4, which includes many features that are not supported in CKEditor v5. When CKEditor v5 support is added in a future PeopleTools 8.60 patch, you will no longer be able to use the CKEditor v4 features listed in the following table. Therefore, Oracle recommends that you evaluate your usage of each of these features now to begin the process of phasing them out before CKEditor v5 is delivered in a future PeopleTools 8.60 patch.

Important! The information in this section was complete at the time of publication. However, as integration with CKEditor v5 progresses, additional limitations may be encountered and other limitations may be eliminated depending on what is implemented by the CKSource team. To stay current with the latest information, subscribe to the following technical bulletin on My Oracle Support: CKEditor Features to Be Deprecated in Future PeopleTools Patches (Doc ID 2848918.1)

The following CKEditor features will be deprecated in a future PeopleTools 8.60 patch. Features identified as plug-ins are rendered as button in the rich text editor toolbar.

Feature

Description

Anchor plug-in

This plug-in provides the capability to insert anchors with some properties; this is part of the Links plug-in.

Button (form control) plug-in

This plug-in adds a button form control element in the editor content.

Check box (form control) plug-in

This plug-in adds a check box form control element in the editor content.

Custom style files

The use of custom style files with Application Designer will be deprecated with CKEditor v5 in a future PeopleTools 8.60 patch.

See Creating Custom Style Files.

Custom template files

The use of custom template files with Application Designer will be deprecated with CKEditor v5 in a future PeopleTools 8.60 patch.

See Creating Custom Template Files.

Elements Path plug-in

This plug-in displays a list of HTML element names in the current cursor position. By default, the list appears at the bottom of the editor interface and can give you contextual information about the content that you are creating.

Insert Smiley plug-in

This plug-in provides a set of emoticons to insert into the editor via a dialog window.

Maximize plug-in

This plug-in adds a toolbar button maximizing the editor inside a browser window.

New Page plug-in

This plug-in adds a toolbar button that clears the editing area and creates a new page.

Radio button (form control) plug-in

This plug-in adds a radio button form control element in the editor content.

Selection field (form control)plug-in

This plug-in adds a selection field (a drop-down) form control element in the editor content.

Show Blocks plug-in

This plug-in adds the command to visualize all block-level elements by surrounding them with an outline and displaying their element name at the top left.

Text area (form control) plug-in

This plug-in adds a text area (a long edit box) form control element in the editor content.

Text field (form control) plug-in

This plug-in adds a text field (an edit box) form control element in the editor content.

CKEditor v5 API

The CKEditor v4 API differs from the CKEditor v5 API, which will become the supported version in a future PeopleTools 8.60 patch. Therefore, you are encouraged to research the differences between these APIs as soon as feasible so that you can update and test any custom configurations and plug-ins that you’ve created.

By default, CKEditor files can be accessed without authentication on the web server. Oracle recommends that after your PeopleSoft Internet Architecture installation, you make sure to secure any files or folders at the web server level as needed. To secure CKEditor files, security has to be setup at web server level. How you configure this security varies according to your web server product.

For information on implementing security on Oracle WebLogic see Securing Servlets on WebLogic

The default configuration filename is config.js. You can locate this file in the PIA_HOME\webserv\domainname\applications\peoplesoft\PORTAL.war\sitename\ckeditor directory.

To create a custom configuration:

  1. Copy the code in the config.js file.

  2. Open Application Designer and create a new HTML definition.

  3. Paste the code into the HTML definition.

  4. Save the HTML definition. Prefix the definition name with PT_RTE_CFG for example, PT_RTE_CFG_MYCONFIG.

    Note: Only HTML definitions with the PT_RTE_CFG prefix appear in the Configuration Settings Id drop-down list box.

  5. Modify the code in the HTML definition as necessary and save. The code might look like this example:

    Important! The CKEditor v4 API differs from the CKEditor v5 API, which will become the supported version in a future PeopleTools 8.60 patch. Therefore, the following code examples may change depending on the requirements of the v5 API.

    CKEDITOR.editorConfig = function( config )
    {
    	config.toolbar =
    [
    	['Templates','Styles','Cut','Copy','Paste','Bold','Italic','Underline','Strike'],
    
    ];
    };
    

    In this example, the Cut, Copy, Paste, Bold, Italics, Underline, and Strike buttons and the newly created custom templates and the styles appear in the toolbar at runtime.

  6. To use the new configuration, open the Long Edit Box Page Field Properties dialog box; select the Options tab; click the Configuration Settings Iddrop-down list box; and then select the HTML definition name from the list of values that appear.

    See Setting Options Properties.

Important! The use of custom template files will be deprecated with CKEditor v5 in a future PeopleTools 8.60 patch. Therefore, you are encouraged to discontinue your use of custom template files as soon as feasible.

The rich text editor delivers templates that help you format the text in predetermined ways. The default template file is default.js. You can locate this file in the PS_HOME\webserv\domainname\applications\peoplesoft\PORTAL.war\sitename\ckeditor\plug-ins\templates\templates folder.

To create a custom template file:

  1. In Application Designer, create an HTML definition and save it as PT_RTE_TMPL_TEMPLATE. The definition name should always be prefixed with PT_RTE_TMPL,_ and the HTML must include 'pt_rte_template' as you see in this example:

    CKEDITOR.addTemplates('pt_rte_template',{imagesPath:CKEDITOR.getUrl(CKEDITOR.plug-ins.getPath('templates')+'templates/images/'),templates:[{title:'Image and Title',image:'template1.gif',description:'One main image with a title and text, which surrounds the image.',html:'
    <h3><img style="margin-right: 10px" height="100" alt="" width="100" align="left"/>Type the title here</h3>
    <p>Type the text here</p>'}]});

    Note: The name 'pt_rte_template' is the fixed name, which has to be set for any custom template that you create. The template name should be exactly the same as mentioned above.

    Save the HTML definition.

    Note: It is recommended that if you create a custom template file, that you create a custom configuration file for it to reference.

  2. To use the new configuration, open the Long Edit Box Page Field Properties dialog box; select the Options tab; click the Template File Iddrop-down list box; and then select the HTML definition name from the list of values that appear.

    See Setting Options Properties.

  3. Click the OK button.

  4. Save the page definition.

Note: When associated to a long edit box, all templates in an HTML definition are available to all users. To limit the available templates for specific rich text enabled long edit boxes, create a new template HTML definition to contain only the templates that you would like for the application user to see and associate that definition to the field.

Important! The use of custom style files will be deprecated with CKEditor v5 in a future PeopleTools 8.60 patch. Therefore, you are encouraged to discontinue your use of custom style files as soon as feasible.

The rich text editor delivers styles to assist you in entering data using specific styles that combine color, font and format. The default configuration file is default.js and is in the PIA_HOME/webserv/.../styles folder.

To create a custom style file

  1. In Application Designer, create an HTML definition and save it as PT_RTE_STYLE_MYSTYLE.

    The HTML Object name used for defining styles should always be prefixed by PT_RTE_STYLE.

    This is sample code for an HTML style definition:

    CKEDITOR.stylesSet.add( 'pt_rte_style',[{name:'Blue
    Title',element:'h3',styles:{color:'Blue'}}]);

    Note: In this style example, the name 'pt_rte_style' is the fixed name, which has to be set for any custom style that you create. The style name should be exactly the same as mentioned above.

  2. To use the new configuration, open the Long Edit Box Page Field Properties dialog box; select the Options tab; click the Style File Iddrop-down list box; and then select the HTML definition name from the list of values that appear.

    See Setting Options Properties.

  3. Click the OK button.

  4. Save the page definition.

Note: When associated to a long edit box, all styles in an HTML definition are available to all users. To limit the available styles for specific rich text enabled long edit boxes, create a new style HTML definition to contain only the styles that you would like for the application user to see and associate that definition to the field.

Important! The CKEditor v4 API differs from the CKEditor v5 API, which will become the supported version in a future PeopleTools 8.60 patch. Therefore, you are encouraged to research the differences between these APIs as soon as feasible so that you can update and test any custom plug-ins that you’ve created.

A plug-in enables you to create an application-specific toolbar button. See CKEditor v5 API Documentation.

By default, when you upload images the system stores them in the PTRTDB table. The default URL ID is PT_RTE_IMG_DB_LOC. To create a different storage location and URL ID, follow these steps:

  1. Create a new record definition.

  2. Insert the FILE_ATTDET_SBR subrecord.

  3. Save and then build the record definition.

  4. Clone these record definitions:

    • PTRTDB_BMP

    • PTRTDB_GIF

    • PTRTDB_JPG

  5. Save the record definitions, name them like this: <myrecord>_BMP, <myrecord>_GIF, and <myrecord>_JPG.

  6. For each record, open the SQL Editor and change the FROM statement in the SQL to this:

    FROM PS_<your record name from step 3>
  7. Save and build each view.

Note: FTP storage is not supported.

Note: It often will require end users to refresh a page or access it twice in order to display an image in a rich text editor field after the following events: browser cache has been cleared, web server cache has been cleared, the posting using the rich text editor field (such as a job posting) is new.