Can the controls on the default Insert Image dialogue be styled either directly or through style sheets? i.e. buttons, text boxes, etc.
Hi, Yen.
You can look at this sample, that shows you how to put custom images for the toolbar items. What you need to do is create a directory and pass the path of that directory as value to the WebHtmlEditor 'ImageDirectory' property. Inside the folder you can place your image and then this image name should be the value for the 'Type' property of ToolbarUploadButton (this is the object for Insert Image button).
I'm not sure if you will be able to set the image using CSS rules, because the button is a HTML 'img' and is not set using CCS 'backround' property.
Here is also one topic that can help you customize your Toolbox.
I hope this will help you and if you have more questions don't hesitate to write.
Best regards,
Nikolay
Nikolay,
Thanks for the quick response.
My question is actually related to styling the dialogue window that pops up after you press the toolbar button, NOT the toolbar button itself.
This is the dialogue with File list, Preview window, Height, Width, Proportional Size, etc.
Is there a way to apply styles to the controls on this dialogue?
Thanks,
Yen
hi,
can you please tell me how can I change the name of the file being uploaded in the HtmlBoxUpload. Why I want to do so... actually the files(images) being uploaded have longer and unusual names, and hence I want them to follow a pattern. thanks
First sorry for not understanding you in the right way.
If you look again at the same sample, you will see that 'ToolbarUploadButton' object has tag 'Upload' which represents the HtmlBoxUpload object. This object propose a set of properties and events that will allow you to modify to look and feel of the dialog. One of the properties is CssClass and this class is applied to the 'body' HTML tag of the new dialog window.
Another approach can be if you want to just add your own CSS stylesheet that will be applied on the whole dialog window. I don't know if this will be better option because if you inspect the dialog HTML you will see that there is no special classes that are applied, which means that your own style rules will have access only to HTML elements like body, table, tr, td, etc. If the properties of HtmlBoxUpload are enough for your needs they are preferable.
Just in case you want to add your own style sheet you will need in some way load the CSS file or build in the style rules in the HTML response of the Dialog, which means you need to modify this response. This can happen if you attach to HtmlBoxUpload events.
<ighedit:ToolbarUploadButton runat="server" Type="InsertImage">
<Upload OnLoad="Upload_OnLoad"/>
</ighedit:ToolbarUploadButton>
Inside the Upload_OnLoad server handler you need to modify the server response.
I hope this time I understood your question and mainly hope that the post will help you.