Huge Collections of Software Manuals and Knowledgebase

GreatManuals.com
Huge Collections of Software Manuals and Knowledgebase

 
Home Contact us Request to publish your help manuals Request to remove your help manuals Buy Now
Introduction
» Sferyx JSyndrome HTMLEditor
» General Compatibility
» Installation
Features & Fixes
» What's New in Version 6.5?
» What's New in Version 6.0?
» What's New in Version 5.5?
» Common Features
» New Features Summary from 4.5 Update
» Features Inherited from 4.0 Update
» Features Inherited from Previous Update
» Feature Matrix Light, Professional, Enterprise Versions
» Features Highlight
Using Sferyx JSyndrome HTMLEditor
» Applet Parameters
» Customizing User Interface
» Accessing HTMLEditor From Javascript
» Configuration of Local/Remote File Browsing for Images & Hyperlink
» Setting Content of Editor
» Getting Content of Editor
» Inserting Contents, Images & Hyperlinks into Editor
» Save Remote Functionality
» Upload Multipart Content Functionalities
» Translating User Interface
» Adding External Style Sheets
» Setting Read Only Sections within Documents
» Using Sferyx LiveConnect Proxy for Mac OS X
» Browse & Save Buttons
Additional Information
» Supported Encodings
» Our Services & Assistance
» Online Resources
 
Buy Sferyx JSyndrome HTMLEditor Online! Buy Sferyx JSyndrome HTMLEditor Online!

Setting Content of Editor

There are several approaches for setting the content of the editor depending on the exact usage. Here are explained the most common:

  • Using the applet parameters to set the content directly from the server-side script
  • Using the initialURL applet parameter to open remote location when the editor is loaded
  • Using javascript functions to set the content during runtime

1) Using the applet parameters to set the content directly from the server-side script:

software updates   software manuals
free windows repair data leakage protection thumb drive data recovery
business solution best software faqs setup package

The easiest way to set the content of the editor is similar to those of the html <textarea> - the content is set directly through the server-side script inside the applet tags. If you are dealing with complex HTML content it is necessary to pass it encode to the applet parameter in order to do not interfere with the source of the page containing the applet. The editor will automatically decode and display the content for editing.

Simple illustrations of that are as follows:

- If you are using ASP server scripting you can do the following:

<PARAM NAME="initialURLEncodedContent" VALUE="<%=Server.URLEncode( your_content_variable_here )%>">

- If you are using PHP server scripting you can do the following:

<PARAM NAME="initialURLEncodedContent" VALUE="<?php echo urlencode( $your_content_variable_here ) ?>">

- If you are using JSP server scripting you can do the following:

<PARAM NAME="initialURLEncodedContent" VALUE="<%=URLEncoder.encode( your_content_variable_here ); %>">

This approach is very simple and easy to use way for passing dynamically generated content to the editor, without the use of complex javascripts and it is fully crossbrowser and crossplatform. This example will work on all browsers on all platforms without any modification.

You may need to specify the parameter absoluteDocumentTranslationURL in order to resolve properly the relative images and hyperlynks contained inside the document. Please see the Applet parameters section for major details about the various parameters.

The content will be inserted into the applet parameter (it can be also entire HTML page - it will be URL encoded and will not affect the page containing the applet). When the editor is loaded and started the content will be decoded and shown immediately into the editor, since it has been already loaded with the page.

If you are dealing with plain text as initial content, you may consider also initialContent applet parameter which is not URL encoded and is recommended for plain text content. Should be used in conjunction with server-side scripts as explained above, but without URLEncoding the content.

2) Using the initialURL applet parameter to open remote location when the editor is loaded:

You can specify a remote location to be opened when the editor is loaded. This way you can control easily what the editor loads, and is the easiest way to open complex pages with images and hyperlinks which need to be resolved correctly

<PARAM NAME="initialURL" VALUE="http://yourhost/your_page_to_be_loaded">

Note that the URL should be a fully qualified absolute URL including the protocol (http://) etc.

The document base for resolving of images will be set automatically with the location of the page, however if you want to override this setting you can do so using the absoluteDocumentTranslationURL applet parameter. Please see the Applet parameters section for major details about the various parameters.

3) Using javascript functions to set the content during runtime:

If you would like to change the content of the editor during runtime, for example for passing the content from other page elements such as <textarea>, <div> or other document fields, you can use the various javascript functions as follows:

if your editor is named htmleditor, you can invoke the various javascript functions directly the following way:

htmleditor.setContent(some_html_content);

This may be associated with various event handlers such as button click or onLoad page handlers.

htmleditor.insertContent(some_html_content);

This will insert new content at the caret position. May be used to insert page fragments in already existing documents.

htmleditor.setURLEncodedContent(String htmlURLEncodedContent) - sets the content of the HTMLEditor. The content could be an html document which is URLEncoded - it will be decoded by the editor and rendered properly.

htmleditor.insertText(String plainText) -inserts plain text content inside the editor without erasing the rest of the document. The new content is inserted at the current caret position. The text inserted will take the attributes of the text at the caret position (ex. bold, italic etc.) If there is a selection, the selection will be replaced with the new text.

htmleditor.insertImage(String imageURL) -inserts an image inside the editor. It could be also relative URL - the correct resolving of the relative URLs depends on the configuration of the applet parameter absoluteDocumentTranslationURL

htmleditor.insertLink(String linkURL) -inserts a hyperlink over the selected text in the editor. For correct resolving of relative URLs if used as an applet you may cosider the Applet Edition of this product.

See the supplied sample pages for major details about the use of javascript functions. You may consult also the Accessing the editor from Javascript section for all available javascript functions.

Buy Sferyx JSyndrome HTMLEditor Online! Buy Sferyx JSyndrome HTMLEditor Online!
Home | Contact Us | Request to publish your help manuals | Request to remove your help manuals