by Harjo » Tue Feb 01, 2005 9:41 am
Here is some more info:
Methods
The plugin exposes eleven main functions to a servoy developer environment-
1. openFile(String filename)
This function opens a file in the server given by the filename parameter. The fileName parameter can contain full path or relative path. The relative paths are searched in servoy/server/webapps/root directory.
2. openStringSaveInFile(String htmlString,String filename)
This function opens the given htmlString in the editor. The save operation in the editor will save the html into a file in server given by the file name parameter. The fileName parameter can contain full path or relative path. The relative paths are searched in servoy/server/webapps/root directory.
3. openTableColumn(String serverName,String tableName,String columnName, String whereConditio)
This function opens the data in a servoy db field . The field is given by serverName, tableName , colummName and whereCondition parameters. The whereCondition is used to select the row. The syntax of where condition is same as SQL where clause excluding the where word. If the whereCondition returns multiple rows the first row is selected. The save operation in the editor will save the data into the same field.
example: openTableColumn("user_data","editor","html","id=1");
4. openStringSaveinTableColumn(String htmlString,String serverName,String tableName, String columnName,String whereCondition)
This function opens the given htmlString in the editor. The save operation in the editor will save the html into a servoy db field.The field is given by serverName, tableName , colummName and whereCondition parameters. The whereCondition is used to select the row. The syntax of where condition is same as SQL where clause excluding the where word.
If the whereCondition returns multiple rows the first row is selected.
The save operation in the editor will save the data into the same field.
Example:
openTableColumn("<p>sample html string</p>","user_data" ,"editor" ,"html" ,"id= 1" );
5. setMediaFolder(String folderName)
6. setCSSFile(String fileName)
7. setWidth(int width)
8. setHeight(int Height)
9. setSkin(String skinName)
10. setUseServoyLookAndFeel(boolean flag)
11. createFolderInRoot(String folderName)
Preferences
The plugin has the following design preferences. The preferences will appear in the servoy developer edit/preferences/she tab. (These functions are also scriptable! See point 5 t/m 11)
1. Media Folder Name: name of the media folder. This folder should be located in servoy/server/webapps/root
2. CSS File: name of the CSS file. This file should be located in servoy/server/webapps/root
3. Width: Width of the editor. Integer Field.
4. Height: Height of the editor. Integer Field.
5. Skin: Name of the skin.
6. List of functions: This list can be used to enable/disable the functions available in the editor.
I18N
The language is selected based on the servoy local settings. The I18N keys for the plugin are included in the SHEsample.servoy example servoy application. Default language is English.
Harjo Kompagnie
ServoyCampServoy Certified Developer
Servoy Valued Professional
SAN Developer