Sferyx JSyndrome HTML Editor Component EditionEclipse SWT HTML Editor Integration ManualAdvanced Eclipse SWT HTML Editor WYSIWYG component with Automatic Image Upload and Publishing, clean Copy & Paste from Microsoft Office and also PDF Export, Open and Import Docx and RTF files, Save as DocxVersion 22.0
|
Download Sferyx JSyndrome HTMLEditor Component Edition Pro :
HTMLEditorDemo.zip
(ZIP file, ~ 2.6 MB)
Place the jar file in the designer's build classpath and it will be loaded by the Eclipse SWT environment. You can add this as follows:
Your project --> Build Path --> Configure Build path --> add HTMLEditorPro.jar
and make sure to import all the necessary packages including org.eclipse.swt.awt.SWT_AWT
We have provided a special wrapper class sferyx.administration.editors.HTMLEditorSWTBean class which provides instant integration with just a few lines of code as follows:
Composite composite = new Composite(shell, SWT.NO_BACKGROUND | SWT.EMBEDDED);
Frame frame = SWT_AWT.new_Frame(composite);
HTMLEditorSWTBean htmlEditorSWTBean=new HTMLEditorSWTBean();
frame.add(htmlEditorSWTBean);
shell.open();In the HTMLEditor distribution in the folder "examples/eclipse-swt integration examples" you can find sample application illustrating the SWT integration in details.
You can use the methods available directly into the HTMLEditorSWTBean class such as setContent(String content), getContent() etc, or by accessing directly the HTMLEditor class you can use the entire editor's API like this :
HTMLEditor htmlEditor=htmlEditorSWTBean.getHTMLEditorInstance();
Using this method and once retrieved the reference to the htmlEditor object, you can access the whole API and all methods and functionalities as described in the Swing Integration manual.
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 (java.lang.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, java.lang.String styleSheetURL) - Loads external style sheet specified by the given URL and adds its content to the existing style classes.
public void setExternalStyleSheetLocation (java.lang.String externalStyleSheetLocation) - Sets the external style sheet to be loaded and used for rendering and editing of the document.
public void loadStyleSheetRules (java.lang.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.
General questions / System configurations
Demo version questions
Publishing content
Custom XML tags
Customization/Internationalization features
Content manipulation features
Application integration features
- How to disable the Main Menu?
- How to disable the Toolbars?
- How to disable the Statusbar?
- How to change the icons on the toolbars?
- How can I implement my own toolbar buttons instead of the default ones - also can I use different toolbar and move everything elsewhere?
- How to show/hide the rulers in the visual editor?
Oracle Forms Integration
Licensing questions
Customization services
Customer support questions
Add-ons / Additional features
All Sferyx products are assured with continuous e-mail support. With the retail products is included in the price 30 days startup support. Additionally, you can purchase annual support subscription tickets from our web store.
Sferyx offers also a wide range of customization services for its products in order to satisfy any customer requirement. We can adapt our products to fit the customer needs and any kind of integration requirements. We execute also express developments, customization under request, development of new features on demand. You can request a quote at sales@sferyx.com or support@sferyx.com indicating your requirements and the terms of delivery.