Absolute and Relative Paths in MSHTML
After reading of issues that MSHTML (or the DEC, the DHTML Editing Component) has with setting all paths to absolute, I felt I should divulge my solution: set the baseurl of the editor. If using the DEC, where editor is the id of the object try the following: editor.BaseURL = "http://www.example.com/"; In doing so, any calls to an href should now omit the base URL. ...
Prevent Image Resize in MSHTML/DEC
A recent comment asked how to prevent people from resizing images within the DEC. The process to do so is relatively simple. We iterate through every image within the editor and attach the onresizestart event and then cancel the event. You'll also need to attach the event to every image that gets inserted into the editor after load. There's three components to putting this together. The first is ...
WYSIWYG editing in Mozilla
Having developed a WYSIWYG editor for IE, I'm happy to see that Mozilla 1.3+ has similar functionality. It even works in Firebird since it's based on the Mozilla code. The interesting thing will be to test it out on a Mac. This should theoretically offer cross-platform editing. My only complaint is use of the selection and range objects is different than IE. Since neither object appears to conform...