Available methods accessible directly from the sferyx.administration.editors.HTMLEditorOracleBean class in Oracle Forms

You should use the same rules for accessing those methods as described above in the OracleForms PL/SQL script examples:

public void setEnableCustomEventDispatching(boolean customEventsDispatchingEnabled) - this method allows to enable/disable dispatching of the events from the editor to the underlying form

public boolean isEnableCustomEventDispatching() 
- this method returns whether is enabled/disabled dispatching of the events from the editor to the underlying form

public void dispatchOracleFormsEvent(String name, Object event) - this method allows to dispatch events from the editor to the underlying form which will captured into the WHEN-CUSTOM-ITEM-EVENT trigger of the form.

public void setCustomEventDispatchingMask(String eventMask)
-This method allows only specified events to be dispatched once they have been enabled through the setEnableCustomEventDispatching. As argument can be specified a comma separated list of event names which are allowed to be dispatched to the  WHEN-CUSTOM-ITEM-EVENT. Example list of event names is as follows: "mouseReleased,insertUpdate,keyTyped" etc. By default all events are enabled through setEnableCustomEventDispatching.
 
public void resetCustomEventDispatchingMask() - will reset the dispatching event mask.

public void setEnableActionEventMaskForUIItems(String uiItemNames,boolean discardDefaultActions)- this method allows to be captured only specific action events from all UI elements such as toolbars and menus. discardDefaultActions specifies whether the default action for the UI element to be suppressed or not. This way you can implement easily your own handlers for all UI items of the editor by disabling the default functionality and implementing a new one.

public void addKeyToKeyEventMask(int keyCode, boolean shiftDown, boolean altDown, boolean ctrlDown, boolean metaDown, boolean altGraphDown) - If key is added to the key event mask only events generated from this key will be dispatched as custom events, others will be ignored . To reset the event mask use resetKeyEventMask method. keyCode is the code of the key on the keyboard. Example Enter is 13, Space bar is 32 etc.

public void resetKeyEventMask() -To reset the event mask use resetKeyEventMask method

So if you want to set key event mask for the F9, Shift+F9 and F10 you will need to do like this:

htmlEditor.addKeyToKeyEventMask(120, false,false,false,false,false);
htmlEditor.addKeyToKeyEventMask(120, true,false,false,false,false);
htmlEditor.addKeyToKeyEventMask(121, false,false,false,false,false);


public void setContent(String htmlContent)
- sets the content of the editor

public void insertContent(String htmlContent)
- inserts new content into the editor at the caret position

public void insertPlainText(String htmlContent)
- inserts new plain text into the editor at the caret position

public void setRemovedToolbarItems(String itemList)
-allows customization of the toolbars

public void setRemovedMenuItems(String itemList)
-allows customization of the menu items

public void setRemovedMenus(String itemList)
- allows customization of the menus

public void setStatusBarVisible(boolean visible)
-sets the state of the status bar.

public void setPopupMenuVisible(boolean visible) -sets the state of the popup menu.
 
public String getContent()
-gets the content of the editor.

public String getPlainText()
-gets the content of the editor as plain text.

public void setToolBarVisible(boolean visible)
-sets the state of the toolbar bar.

public String getBodyContent() 
-gets the body contentof the editor - no html and head tags will be generated

public void insertImage(String imageURL)
- inserts image at the caret position

public void insertLink(String linkURL) 
- inserts link over the selected text

public void setDefaultCharset(String encoding)
 
public void openLocation(String location)
- opens the given location inside the editor

public void setExternalDictionary(String externalDictionary)
- loads external dictionary

public void setPreviewModeOnly(boolean previewModeOnly)
- sets the preview mode only

public void openContentBuffer()
- opens a content buffer for loading large content

public void appendContentToContentBuffer( String content)
- appends new content to a content buffer for loading large content

public void closeBufferAndInsert()
- closes the buffer and inserts the content into the editor

public int getBodyContentLenght()
- returns a length limit set previously for the editor

public int getContentLenght()
- returns a length of the content.

public String getBodyContentPortion(int offset, int length)
- returns a portion of the body content.

public String getContentPortion(int offset, int length)
- returns a portion of the content.

public void setSourceEditorVisible(boolean visible)
-sets the state of the source editor.

public void setPreviewVisible(boolean visible) 
-sets the state of the preview.

public void setAsYouTypeSpellcheckingEnabled( boolean enabled)
- sets the state of spellchecker

public boolean isDocumentEdited()
- returns whether the document has been edited or not.

public void setPreferredPasteOperation(int preferredPasteOperation)
- sets the preferred paste operation

public int getPreferredPasteOperation()
- gets the preferred paste operation

public void loadExternalStyleSheet(String externalStyleSheetLocation)
-loads external CSS file

public String getBodyUnicodeContent()
 - returns the unicode content

public void setSourceCodeModeOnly(boolean sourceCodeModeOnly)
 - sets the source mode only

public void setShowBodyContentOnlyInSource(String _showBodyContentOnlyInSource) -
This method will cause the editor to show only the body content when switching to the HTML source editor.

public String getExternalStyleSheetLocation() -
Returns the URL as string of the external style sheet loaded and used to apply style classes to the document elements

public void loadExternalStyleSheet( javax.swing.text.html.StyleSheet styleSheet, String styleSheetURL) -
Loads external style sheet specified by the given URL and adds its content to the existing style classes.

public void setExternalStyleSheetLocation(String externalStyleSheetLocation) -
Sets the external style sheet to be loaded and used for rendering and editing of the document.

public void loadStyleSheetRules( String styleSheet) -
Allows to load some style rules dynamically like for example body{background-color:red} etc.

public void setDefaultInitialFont(String initialFont)
- sets the default font family to be used by the editor.

public void setDefaultInitialFontSize(String fontSize)
- sets the default font size to be used by the editor.

public String getContentAccessibleForScreenReaders()
- gets accessible content intended for screen readers - this will generate tags which are understood by the screen readers.

public String getBodyContentAccessibleForScreenReaders()
- gets accessible cbody ontent intended for screen readers - this will generate tags which are understood by the screen readers.

public HTMLEditor getHTMLEditorInstance() - you can use this method to get a direct reference to the HTMLEditor instance and use all the available API as you whish. This allows full customization and access to all the available features of the HTMLEditor class.

public void setRestrictedHeadingList(String headingList) - his method allows only certain fonts to be shown in the font list combo. The string must contain comma delimited list of the font names to be used like "Normal,Heading 1,Heading 2"

public void setRestrictedFontList(String fontList) - his method allows only certain fonts to be shown in the font list combo. The string must contain comma delimited list of the font names to be used like "arial,sans-serif,tahoma"

public void setRestrictedFontSizesList( String fontList) - his method allows only certain font sizes to be shown in the font size list combo. The string must contain comma delimited list of the font names to be used like "8,10,11"

public void setDefaultInitialFont(String initialFont) - sets the default font to be used

public void setDefaultInitialFontSize(String fontSize) - sets the default font size to be used

public void setWrapNewLineIntoBR(boolean wrap)
- causes <br> to be generated instead of <p> - and to emulate Microsoft Word like paragraph spacing.

public void setSingleParagraphSpacing(boolean wrap) - causes <p> to be generated with default single paragraph spacing- and to emulate Microsoft Word like paragraph spacing.

public String getContentAccessibleForScreenReaders() - converts some tags to be used properly by screen readers when needed.

public String getBodyContentAccessibleForScreenReaders() - converts some tags to be used properly by screen readers when needed.

public void resetDocumentEdited() -resets the point from which isDocumentEdited() to report changes, Useful to be reset after setting the content etc.

public void setPDFExportOutputEncoding( String encoding)  -sets the encoding for the PDF output when the PDFExport Add-on is installed - useful for Chinese etc.

public void setFlowToolbarLayout() - Sets the flow toolbar layout - all the toolbar items will be ordered one after another in a flowing manner in order to wrap around the available space.

public void loadInterfaceLanguageFile( String fileURL) -
Loads external language file for localization of the UI.

public String getEditorState() -Returns the current state of the editor. The returned value is one of
VISUAL_EDITOR
SOURCE_EDITOR
PAGE_PREVIEW


public void setDisableToolbarItems(String toolbarItemNames)

public void setEnableToolbarItems(String toolbarItemNames)

public void setEnabled(boolean enabled)

public boolean isEnabled()

public String selectCurrentWord() - will select the word at the current caret position

public void createEmptyDocument() - will create an empty document inside the editor resetting all the content inside it..

public void replaceCurrentWord(String replaceWith) - sill replace the word at the current caret position with the given word

public void setLocalFileBrowsingDisabled( boolean disabled)- this method will enable/disable the local file dialog when needed. This will result in disabling of all browse buttons which lead to local file browsing

public boolean isLocalFileBrowsingDisabled() - returns whether the local file browsing is enabled

public void setLTROrientation()- this allows easy reversal of the document depending on the writing system used.

public void setRTLOrientation()

public void setEmbedAllImagesInsideTheDocument( boolean embed) - this new method enables the editor to embed all document images inside the HTML code which is retrieved using getContent(), getBodyContent() methods. This way is possible to create fully self contained documents to be saved as simple strings inside database fields (for example CLOB or similar) or even simple text files.

public boolean isEmbedAllImagesInsideTheDocument()

public void setCaretPosition(int position)  -sets the caret postion

public int getCaretPosition()  -returns the current caret position

public void setSelection(int start, int end)  -sets the selection start and end positions

public int getSelectionStart()  -returns the selection start

public int getSelectionEnd()  -returns the selection end

public boolean isCaretPlacedInAReadOnlySection() - indicates if the caret is inside a read-only section of the document

public void setUploadedObjectsTranslationPath(String uploadedObjectsTranslationPath)

public boolean uploadMultipartContent(String saveLocation, boolean entireFile)

public void setPublishContentUsingWebDAV(boolean publishContentUsingWebDAV_)

public void setGenerateUniqueImageFilenames(boolean generateUniqueImageFilenames_)

public void saveToLocation(String saveLocation, boolean entireFile)

public void setGlobalReplacementFontFamilyOnPaste(String replacementFontFamily)

public void setDontConvertCharacters(boolean convert) is used to convert the non ASCII characters to HTML entities for easier store and retrieve operations - you should set this to true - the default value is false.

public void closeBufferAndInsertAtCaretPosition() this method closes the existing content buffer and inserts its content inside the editor at the caret position - this method will not reset the entire content of the editor but will insert it along with the existing one. This should be used in conjunction with openContentBuffer() and appendContentToContentBuffer(String content). This methods are very useful in environments where long content strings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. See supplied examples in the users manual.

public int getPlainTextContentLenght() this method returns the length of the plain text content of the editor.

public String getPlainTextContentPortion(int offset, int length) this method returns portion of the plain text content - this should be used in environments where is impossible the whole content at once due to some limitations such as the case of Oracle Forms. This should be used in conjunction with getPlainTextContentLength() and make cycle for retrieving all pieces through getPlainTextContentPortion(int start, in length)

public boolean saveFile()
- Saves the entire content of the editor as HMTL file. In Oracle Forms environment to be used as follows:

BEGIN
FBean.Invoke(bean,1,'saveFile');
END;

public void saveAsEmailMessageFile(String file) - Saves the entire content of the editor as multipart e-mail message file .eml - it will include also all images inside. It can be opened in email clients like Outlook, Thunderbird etc.

DECLARE
hArgs FBEAN.ARGLIST;
BEGIN
hArgs := FBEAN.CREATE_ARGLIST;
FBEAN.ADD_ARG(hArgs,'c:\myfile.htm');
FBean.Invoke(bean,1,'saveAsEmailMessageFile',hArgs);
END;

public boolean writeContentAsMultipartMessageToFile(String fileName) - Writes into the specified file the entire content as multipart MIME e-mail message format data.
If you use file extension .eml you can open the file in e-mail clients like Outlook, Windows Mail, Thunderbird etc.

public String getMultipartMimeMessageContentPortion(int offset, int length) - Returns portion of the content as multipart MIME e-mail message format data - this should be used in environments where is impossible the whole content at once due to some limitations such as the case of Oracle Forms. This should be used in conjuction with getContentLength() and make cycle for retirieving all pieces through getMultipartMimeMessageContentPortion(int start, in length)

public int getMultipartMimeMessageContentLength() - Returns the length of the content as multipart MIME e-mail message format data.

public void printFile() - Shows the print dialog and prints out the edited document

public void openRTFFile(String fileURL) - Opens RTF file silently and imports it into the editor for editing - it should be a fully qualified URL

public void openRTFFile(String fileURL) - Opens RTF file silently and imports it into the editor for editing - it should be a fully qualified URL

public boolean saveFile() - Saves the entire content of the editor as HMTL file

public boolean saveAsEmailMessageFile() - Saves the entire content of the editor as multipart e-mail message file .eml - it will include also all images inside. It can be opened in email clients like Outlook, Thunderbird etc.

public boolean saveDocxFile() - Saves the entire content of the editor as MS Word Docx file - it will show a save file dialog to choose the save location

public void saveDocxFile(String file) - Saves the entire content of the editor as MS Word Docx file to the provided location.