HtmlEditor :  Phorum 5 The fastest message board... ever.

This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
At last a proper update
Posted by: Tim Anderson (---.server.ntli.net)
Date: Saturday, 04-Oct-2003, 13:17:32

I've updated a significant revision of the control. Usual place. I've left the old one there at htmleditor_old.zip just in case there are any problems.

This one incorporates most (not all) of the improvements in Jamie's alternate code. I've also tweaked some of the COM definitions (thanks to Nikhil Kothari for some ideas). I've added a bunch of new easy-to-use methods for common operations. I've even got a working implementation of IDM_COMPOSESETTINGS so you can set the default composition font (do this with an empy document in Design mode).

Please take a look and especially advise me if you run into stability issues.

Tim

Re: At last a proper update
Posted by: Tim (---.server.ntli.net)
Date: Sunday, 05-Oct-2003, 11:43:50

I've revised this and uploaded a replacement. Mostly tidying up. I've renamed the public properties and methods where needed so all start with upper case. I've introduced a DefaultComposeSettings property which lets you set the initial font in the designer. However, the ComposeSettings class has an Enabled property which is false by default. The reason is that I don't much like it, since it inserts a FONT tag into the HTML. On the other hand, it could be handy if you just want to pop an HtmlEditor on a form and set its font in the style of a normal Windows control.

Tim

Re: At last a proper update
Posted by: Tim (---.server.ntli.net)
Date: Monday, 06-Oct-2003, 00:08:11

Found a couple of problems. One was where in some circumstances the new approach to activating the control failed and you could end up with a non-activated HTML document. I've fixed this with a small workaround. Second, I find the new built-in shortcuts great, but I was having trouble trying to *stop* them firing. For example, you might want to disable Ctrl-F. I couldn't work out how to make e.handled do the trick, so I've taken a pragmatic approach and added a BeforeShortcut event. Simply handle this and set e.Cancel = true for shortcuts you want to disable (the event args also give you the key that was pressed).

Tim

Re: At last a proper update
Posted by: James Hancock (---.darwinconsulting.com)
Date: Tuesday, 07-Oct-2003, 04:09:21

In the definition of the IHTMLDocumentEvents2 you can handle these correctly and prevent certain things. But! Everything is backwards, so where you would set it to true, you have to set it to false and visa-versa...

Re: At last a proper update
Posted by: matthew (135.196.72.---)
Date: Monday, 13-Oct-2003, 13:39:11

so is this 'better' than htmleditorjh.zip?

Re: At last a proper update
Posted by: Tim (---.server.ntli.net)
Date: Monday, 13-Oct-2003, 15:26:43

It's the one I use. There are still a few things in htmleditorjh.zip that aren't in the other, and vice versa. Jamie's upload probably still has the bug in OnUIDeactivate, plus I think the new definitions for IOLECommandTarget are improved. The biggest difference is that Jamie's version has an implementation of HTMLDocumentEvents2 that I've not incorporated as yet. That's partly because I want to investigate it more closely, and partly because I'd like to expose the most useful events properly through the control, rather than having to modify the control source in order to use them.

Tim



Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
k7334
This is a moderated forum. Your message will remain hidden until it has been approved by a moderator or administrator
This forum powered by Phorum.