Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delphi Twebbrowser No CR from Javascript

Status
Not open for further replies.

CNielsen4211

Programmer
Apr 26, 2011
2
AU
the Delphi Twebbrowser does not accept a key down event and I solved that problem by using code to transfer keystrokes through to windows.
This excelent code here: solves the problem, but my problem is more serious.

Cartridge returns from Javascript wont work.

Everything works fine when Cartridge Returns are entered in standard web components like a textarea, but when a wysiwug editor like tinyMCE ( and others is used through Javascript the Cartridge Return is ignored.

has anyone got an idea how to solve this??
 
I've not looked at the code you've linked to so don't know how it proxies the keystrokes. However, if it is only dealing with keystrokes in textarea elements, then it probably will not work with many RTEs that use editable elements that are not form elements (e.g. <div>, etc).

In this case, one solution might be to extend your code to listen for key events on these elements as well.

Incidentally, it's "carriage return" - "cartridge return" is something you might do if your laser printer toner needs recycling, or perhaps the ejection mechanism of a shotgun.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Snippets & Info:
The Out Atheism Campaign
 
CNielsen,

use the EmbbededWB browser component from BSalsa.
It is the only component that provides a complete implementation of the API.

you can find it here:


I verified with TinyMCE and it works.

Cheers,
Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Thank you BillyRayPreachersSon and Whosrdaddy for these excelent responses.

Apologies for my typo, I had been chasing this problem for many hours and not checking my typing, sorry.. I was talking about the carriage return keyboard function.

Dan, I'm not sure how to extend the code to "extend your code to listen for key events on these elements" as you suggest, but I do believe you have the right answer. I will be researching on how to go about it.

And Whosrdaddy, thank you for pointing me to the EmbbededWB component. I'm keen to try it out as you say it should work.

Problem is that bsalsa seem to be discontinued and I can't raise anyone at that site. Their forum is closed. But I downloaded the component package and it won't install. I get an error saying there is an access violation on the delphi 70.dll.. I tried both Delphi 7 and D2005 and both won't install. So I'm not sure where to go from here.

If you have any further suggestions I'd be glad to hear them.
 
The product is certainly not discontinued (and there is forum activity).

download the file from this link:


unrar the source code under your delphi7 installation.
start delphi, in options add the sources folder to your library path.
open EmbeddedWebBrowser_D7.dpk under the packages folder and install the package.

now you can use the embeddedwb component...

Cheers,
Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top