Lars,
We realize that the document is lagging behind, and we will included more instructions into the developer guide in this week.
Here are the answers to your questions:
>>how to apply stylesheets to the textarea
In the new version, we have a separate template file to deal with this issue.
The file name is Template.aspx. you can find it in the CuteSoft_Client/CuteEditor
You can modify this file to fit your requirements.
>> a general description on the configuration principles
There are two types of configuration files.
One this the toolbar configuration files.
1. Toolbar configuration files
The Toolbar configuration filesRepresents several predefined sets of buttons. These configurations are applied using AutoConfigure property.
Compare to version 3.0, the version 4.0 provides a convenient way of creating your own toolbars. The details of configuration are specified by an XML file which is very easy to modify.
2. Security security policy configuration files
Cute Editor 4.0 allows developers to assign a pre-defined set of permissions by group or individual. This prevents a normal user to access the administration functionality.
For example, only the admins have the permission to create folders and delele folders.
The details of permissions are specified by an XML security policy file. Each level maps to a specific file. The default mappings:
- admin—maps to admin.config
- default—maps to default.config
- guest—maps to guest.config
You can customize and extend each policy file by editing the XML security policy file. You can also create your own policy files that define arbitrary permission sets.
So we move many editor properties into this XML security policy file.
In your code, you can do this:
By using the security policy file, you can group permissions into one file. we think the version 4.0 provides a convenient way of helping you build a clean solution.
Otherwise, there a lot of permissions you need to configure in the editor page.
|
Permissions/Resource Setting | Admin | Default | Guest |
AllowUpload | | | |
AllowDelete | | | |
AllowCopy | | | |
AllowMove | | | |
AllowCreateFolder | | | |
AllowDeleteFolder | | | |
RestrictUploadedImageDimension | | | |
AutoResizeUploadedImages | | | |
MaxImageWidth | 6400 | 640 | 640 |
MaxImageHeight | 4800 | 480 | 480 |
MaxImageSize | 10000 | 100 | 100 |
MaxMediaSize | 10000 | 100 | 100 |
MaxFlashSize | 10000 | 100 | 100 |
MaxDocumentSize | 10000 | 100 | 100 |
ImageGalleryPath | ~/uploads | ~/uploads/member | ~/uploads/guest |
MediaGalleryPath | ~/uploads | ~/uploads/member | ~/uploads/guest |
FlashGalleryPath | ~/uploads | ~/uploads/member | ~/uploads/guest |
FilesGallaryPath | ~/uploads | ~/uploads/member | ~/uploads/guest |
ImageFilters | .jpg
.jpeg
.gif
.png
| .jpg
.jpeg
.gif
| .jpg
.jpeg
.gif
|
MediaFilters | .avi
.mpg
.mpeg
.mp3
| .avi
.mpg
.mpeg
| .avi
.mpg
.mpeg
|
DocumentFilters | .txt, .doc
.pdf, .zip
.rar, .avi
.mpg, .mpeg
.mp3, .jpg
.jpeg,.gif
.png
| .pdf, .doc
| .txt, .doc
.pdf, .zip
|
However, I think the kenA's point make good sense too. In some situation, the developers want to set the permission properties dynamically.
We are discussing this issue right now. Maybe we will add those properties back in a quick fix.
The approch is as followings:
For example:
when the editor loads, we check the editor.MaxImageSize property. If exists, we use that. If not, we will get the value from the configuration file.
>> how to apply custom buttons
In the version 4.0, we have a custom button holder.
You can find it in the full.config file:
<item type="holder" name="insertcustombutonhere" />
You can just create your own button, and add this into this custom button holder control.
For example, I want to create a custom button, when the users click it, it pastes the html code "Hello world" into the cute editor.
Step1: Create custom button holder control
CuteEditor.ToolControl tc = Editor1.ToolControls["insertcustombutonhere"];
if(tc!=null)
{
....
}
Step 2. Create your own button and add it into the custom button holder
CuteEditor.ToolControl tc = Editor1.ToolControls["insertcustombutonhere"];
if(tc!=null)
{
System.Web.UI.WebControls.Image Image1 = new System.Web.UI.WebControls.Image ();
Image1.ToolTip = "Hello world";
Image1.ImageUrl = "tools.gif";
Image1.CssClass = "CuteEditorButton";
SetMouseEvents(Image1);
Image1.Attributes["onclick"]="CuteEditor_GetEditor(this).ExecCommand('PasteHTML',false,'Hello World')";
tc.Control.Controls.Add(Image1);
}
Please not that CuteEditor_GetEditor(this).ExecCommand('PasteHTML',false,'any html code')"; is a clinet side API of Cute Editor.
Hope the above answers helps, let me know if you have any further questions.
asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
asp wysiwyg html editor: http://cutesoft.net/ASP
asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
Live Support: http://cutesoft.net/live-support/default.aspx