Blog
Scribe Rich Edit
Date: 5/8/2005
Ok, so don't assume this might work someday but this is NOT a mock up, it's a real screenshot.



Technically it's RTE inside the Mozilla ActiveX Control as installed with the ZIP download of the Mozilla suite, hosted via ATL in C++... in a plugin.

*breathe*

Currently I have no way of getting the edited HTML back out of the control. But it's fun to play with.
Comments:
fret
05/08/2005 5:13am
I wonder whether this sort of code would allow me to call some jscript and get the html back from the control.
fret
05/08/2005 6:46am
Well the jscript object is not implemented in Mozilla's control.

And then after looking at the IHTMLElement interface it occured to me that I could call the ::click handler of some element to call the required jscript to push the edited HTML back into the DOM... somehow... yes I'm grasping at straws here... but it feels like I'm getting close...

Then I looked at the actual Mozilla implementation of ::click and my hopes were dashed with one E_NOTIMPL.

It all boils down to the fact that I can't call RTE's 'updateRTE' jscript function to somehow get the edited HTML back into a form that is accessible via the IHTMLElement::get_outerHTML API which IS supported by Mozilla's control.
fret
05/08/2005 7:34am
I might have a solution. Well I have some semi-working code.

I've added an onmouseout event to the iframe control that holds all the edited HTML and then I programmatically flick the mouse to 0,0 and back to it's old location, which the user barely notices. Which calls the javascript onmouseout event which updates the html which lets me extract the edited HTML.

The question is whether the onmouseout hack will be reliable in everyday usage or whether it won't update sometimes and send out blank emails.
Carlos Rocha
06/08/2005 8:04pm
Looks promising and it will increase Scribe interest for sure.
Good luck
 
Reply
From:
Email (optional): (Will be HTML encoded to evade harvesting)
Message:
 
Remember username and/or email in a cookie.
Notify me of new posts in this thread via email.
BBcode:
[q]text[/q]
[url=link]description[/url]
[img]url_to_image[/img]
[pre]some_code[/pre]
[b]bold_text[/b]