Hello,
How can I make the InsertImage button display the"Modify Image" popup message?
Currently everytime I click it, it opens up the current page on a popup window.
One more thing, how can I hide a toolbar button programmatically ?
Thanks
As I said, the condition for upload is create and show editor (Visible != false) on initial load (this.IsPostBack == false). So, if WebHtmlEditor raises its async request for upload data, the server should be able to recreate instance of editor. Later on, if view/wizard hides/shows editor, then it should be ok, but on the very first load, editor should be visible. If for your application it means a "stand alone dedicated page", then yes,- it is prerequisite for upload functionality.
Regards,ViktorInfragistics web team
Viktor, thanks for your reply !
Viktor Snezhko"]this.WebHtmlEditor1.Toolbar.Items.RemoveAt(1);BaseChildControl button = this.WebHtmlEditor1.FindByKeyOrAction("Bold");if(button != null) this.WebHtmlEditor1.Toolbar.Items.Remove(button);
This made the trick.
Viktor Snezhko"]Note: any uploaded functionality (images, media, flash, etc.) is available only when editor is created on initial load of page (like aspx), otherwise, while upload request, the instance of control will not be found and server may generate response with default page. So, situation when editor is created on a specific event (like button click, wizard-view event, etc) will destroy upload functionality. No fix is possible.
I'm hiding and showing the WebHtmlEditor using a MultiView control, so every time it shows a popup it will show the current page. Now, If I get the WebHtmlEditor control out of the MultiView it will work fine.......
It is disappointing no to be able to use the WebHtmlEditor in a MultiView control, or WizardControl. So (correct me if I'm wrong) it looks like you need to dedicate an entire page to the WebHtmlEditor control so it can work properly, since you cannot hide it and show it dynamically and expect the multimedia functionality to work.
Is this "Note" somewhere on the documentation? or on a KB article? I guess I missed it. I kept trying to make it work assuming it was a bug-free control.
Again, thanks for your reply.
Hi,
Please debug by building a temporary page which contains only WebHtmlEditor and verify that image dialog appears. If it is not, then it is probably problem with the UploadedFilesDirectory. The simplest way to make it work,- is to set it to a local directory like "./upload", create that directory at location of project and in properties of that directory check "Share this folder".Next, try to find out why editor in your application does not work (experiment with location of "upload", etc).Note: any uploaded functionality (images, media, flash, etc.) is available only when editor is created on initial load of page (like aspx), otherwise, while upload request, the instance of control will not be found and server may generate response with default page. So, situation when editor is created on a specific event (like button click, wizard-view event, etc) will destroy upload functionality. No fix is possible.
To remove item from codes you should use corresponding collection. For example, to remove 4th item and Bold button, you may usethis.WebHtmlEditor1.Toolbar.Items.RemoveAt(1);BaseChildControl button = this.WebHtmlEditor1.FindByKeyOrAction("Bold");if(button != null) this.WebHtmlEditor1.Toolbar.Items.Remove(button);
Some more investigation and seems that this is related to the control being inside a formview (templated containers a problem?).
This is puzzling since one would often want to bind an editor to a field and formviews are the main tool for this.
There has got to be a way for this to work. Or, for me, the tool is relatively useless.
Also, running into the exact same issue here. Kind of disheartening to see several requests for help on the same issue, search of knowledge base has nothing and forum question has no responses at all for extented period of time.