|
Hi Uwe,
I played a little bit further with your HtmlEditControl and managed to resolve some issues and add new (minor) functionality:
- Added support for Font Name and Font Size
- Added support for pasting the image from clipboard and embedding it directly to HTML without the use of any external file.
- Implemented work around for "selecting word on double click" not working with IE10.
- Implemented an "orthodox" (Notepad-like) editor sample
I would like to share my code/findings with you. No strings attached
Thus if you are interested please contact me through http://csscript.net/Support.html[^].
Regards,
Oleg
|
|
|
|
|
Thanks heaps very neat
|
|
|
|
|
|
Fehler beim Versuch der SecurityTransparent-Methode "ZetaHtmlEditControl.HtmlEditControl.getHtml(System.Windows.Forms.IDataObject)" systemeigenen Code über die Methode "ZetaHtmlEditControl.HtmlEditControl.GlobalLock(System.Runtime.InteropServices.HandleRef)" aufzurufen. Methoden müssen sicherheitskritisch oder sicher sein, um systemeigenen Code aufzurufen.
I've tried to Copy a String from one row to another into the same control...
(I added a Binding to DocumentText-Property)
Is there any possibility to fix this problem?
modified 14-Feb-13 10:47am.
|
|
|
|
|
Seems like some strange security issue.
Can you comment on your environment?
Wollen Sie ganz einfach Ihre eigene Homepage erstellen, ohne HTML-Kenntnisse, einfach, professionell und mit viel Freude? Probieren Sie unser Desktop Content Management System (CMS) Zeta Producer für Windows aus. Komplett mit eigenem Shop, Gästebuch, Weblog, Bildergalerien, Integration von YouTube-Videos. Wir haben eine aktive Anwender-Community, schnellen Support, sympathische Support-Mitarbeiter.
|
|
|
|
|
First of all, thank you for your reply!
My Environment is a Windows7 Professional x64 machine (2,5Ghz, 8GB RAM) using ActiveDirectory for user management. I use Visual Studio 2010 Professional and SQL Server 2008.
And additionally we can't ctrl+x the text out from the control...
|
|
|
|
|
Running the HTML Editor app as admin or non-admin?
If non-admin, does the error disappear if you select "run as administrator"?
Wollen Sie ganz einfach Ihre eigene Homepage erstellen, ohne HTML-Kenntnisse, einfach, professionell und mit viel Freude? Probieren Sie unser Desktop Content Management System (CMS) Zeta Producer für Windows aus. Komplett mit eigenem Shop, Gästebuch, Weblog, Bildergalerien, Integration von YouTube-Videos. Wir haben eine aktive Anwender-Community, schnellen Support, sympathische Support-Mitarbeiter.
|
|
|
|
|
The user that i use is a Domain Admin.
I tried it with "Run as Administrator" but the same error occurs.
|
|
|
|
|
U must be changed target framework to 4.0? If so change it back to 2.0 and it's dissapears...
|
|
|
|
|
I found that if I delete all of the html source in the source edit window the control throws an exception. I traced the exception to private
IHTMLTable2 CurrentSelectionTable
....
IHTMLTxtRange rng = CurrentSelectionText;
element = rng.parentElement(); <-----
To get around this I check CurrentSelectionText first.
|
|
|
|
|
Yes, better checking rng for non-NULL first.
Wollen Sie ganz einfach Ihre eigene Homepage erstellen, ohne HTML-Kenntnisse, einfach, professionell und mit viel Freude? Probieren Sie unser Desktop Content Management System (CMS) Zeta Producer für Windows aus. Komplett mit eigenem Shop, Gästebuch, Weblog, Bildergalerien, Integration von YouTube-Videos. Wir haben eine aktive Anwender-Community, schnellen Support, sympathische Support-Mitarbeiter.
|
|
|
|
|
Hi Uwe Keim, I think you should be very busy at work, but i have some question.
1. When i paste a webpage to the control, it show me the page very well but when i retrieve the html code, the form show me characters that not are correct (á,é,í,ó), how can i solve this problem?.
2. Can i save the all the content included images, like a richtextbox using its property .rtf. This is because, i want to implement a email program like outlook using sql2010, and i want to save all the content to share with all users.
Thanks a lot, greats from Perú. Please i need to solve this problem soon.
|
|
|
|
|
Hello, very useful control!
But I have some problems with special characters. For example the german characters ä, ü, ö, ß.
I set the property
CompleteDocumentText with a html-code. But if there any special character, the control shows me a
?
instead
Ö
Know someone how I can solve this problem?
Thank You!
|
|
|
|
|
hi, did you solve your problem.. i have the same.
|
|
|
|
|
Hi Arthur,
Unfortunately not. Now i use a simple text control.
|
|
|
|
|
i had this problem and found the solution.
you have to use System.Web.HttpUtility.HtmlEncode
but before using it, you have to hack some chars such as < or > or ? otherwise HttpUtility will translate them.
Sample :
String text = this.htmlEditUserControl1.HtmlEditControl.DocumentText.Replace('<', (char)1);
text = text.Replace('>', (char)2);
text = text.Replace('&', (char)3);
text.Replace("\r\n", "");
text = System.Web.HttpUtility.HtmlEncode(text);
text = text.Replace((char)1, '<');
text = text.Replace((char)2, '>');
text = text.Replace((char)3, '&');
|
|
|
|
|
Hi,
Thank you for this editor,
How we can change font?
Rgerds
|
|
|
|
|
Very Helpfull. Thanks for sharing
|
|
|
|
|
Thanks for this control, it's great. How can I change Font type?
|
|
|
|
|
I've referenced the ZetaHtmlEditControl in a Visual Studio 2010 VB Class Library project and added the control via the Toolbox to a Windows Form. However, when I debug my assembly and load the form I get this error:
"Could not load file or assembly 'ZetaHtmlEditControl, Version=1.1.03, Culture=neutral, PublicKeyToken=2e2e5ba5da72b6c0' or one of its dependencies. The system cannot find the file specified." However, the ZetaHtmlEditControl.dll (and HttpServer.dll and SgmlReaderDll.dll) are clearly present in the Debug directory.
Note that this Class library is actually hosted by a commercial application (Colligo Contributor) that allows extending its UI via its SDK. So I debug by launching their .exe which then detects and loads my registered custom assembly into their AppDomain or whatever. Perhaps this architecture is complicating things.
Regardless, any ideas?
|
|
|
|
|
Most likely there are som CRTs or other "system" DLLs missing.
I'll recommend the following:
1.) Download and install our tool "Zeta Test" from http://www.zeta-test.com[^]
2.) Look in the installation folder "C:\Program Files (x86)\Zeta Test\Applications" (default)
3.) Copy all Microsoft DLLs to your solution, namely: msvc*.dll , stdole.dll , microsoft.mshtml.dll , Microsoft*.manifest and maybe others, too.
Wollen Sie ganz einfach Ihre eigene Homepage erstellen, ohne HTML-Kenntnisse, einfach, professionell und mit viel Freude? Probieren Sie unser Desktop Content Management System (CMS) Zeta Producer für Windows aus. Komplett mit eigenem Shop, Gästebuch, Weblog, Bildergalerien, Integration von YouTube-Videos. Wir haben eine aktive Anwender-Community, schnellen Support, sympathische Support-Mitarbeiter.
|
|
|
|
|
Hello Uwe,
first thanks for this great control.
1. The httpserver.dll is from telecom AB. Is this file also under the same license?
Did not fully understand the code. Do i need the httpserver.dll if i only want to use it as html editor?
thanks
Martin
|
|
|
|
|
Hi Martin
Regarding 1.) Please see webserver.codeplex.com [^] for the original article of the web server.
Regarding 2.) The whole purpose of the article is to provide an HTML editor. If you do need an HTML viewer, simply use the built-in class [^] of Windows Forms.
Wollen Sie ganz einfach Ihre eigene Homepage erstellen, ohne HTML-Kenntnisse, einfach, professionell und mit viel Freude? Probieren Sie unser Desktop Content Management System (CMS) Zeta Producer für Windows aus. Komplett mit eigenem Shop, Gästebuch, Weblog, Bildergalerien, Integration von YouTube-Videos. Wir haben eine aktive Anwender-Community, schnellen Support, sympathische Support-Mitarbeiter.
|
|
|
|
|
Thanks for the great control, although I have some questions.
1.) According to your article you have ExtendedWebBrowserControl.GetDocumentText method.
Where is this method? I don't see it on an instance of the Extended WebbrowserControl I added to my form.
2.) I instead am using HtmlEditUserControl as it seems to have more functionality, why do you have 3 different controls? It is confusing.
3.) When I paste an image, I get an 'unexpected path' error. How do I go about resolving this?
Thanks
|
|
|
|
|
Hi Greg
Thanks for your feedback!
Regarding 1.): You should call HtmlEditControl.GetDocumentText() as outlined in the TestForm.cs example. I'll update the article.
Regarding 2.): There is HtmlEditControl , the control that you should use when no local toolbar is required. I recently added HtmlEditUserControl which has an optional local toolbar control. So if you are unsure, always use HtmlEditUserControl and activate/deaktivate the local toolbar just as you need.
Regarding 3.): Could you send me the call stack of the exception? (or post it here)?
Cheers
Uwe
|
|
|
|
|