Delphi TBrowser not rendering image uploader for wysiwyg editor properly

419 views Asked by At

I am using a Delphi TweBrowser to load a php form with a WYSIWYG editor from TinyMCE with a plugin for the image uploading.

The WYSIWYG editor renders properly in both browsers(I.E,chrome,etc) and the TweBrowser in Delphi, but the File Manager Popup does not render properly, nor does the functions work properly.

It does display the images. But when I click on the image, it does not insert the image. The button also is not there and some of the labels seem to have disappeared. Is there a reason for this?

Is there anyway to fix it?

Delphi version Delphi Version Chrome Version Chrome Version

UPDATE:

With some help I have figured out, the problem is Delphi is using IE7 compatibility... Is there anyway to force Delphi to use another version of IE which it will be compatible with?

I know the page is compatible with anything IE8 and up...

1

There are 1 answers

0
Jasper Schellingerhout On

If you are in control of the markup then the quick and dirty simplest solution would be to add this meta data <meta http-equiv="X-UA-Compatible" content="IE=8" /> you can specify the lowest level you need (IE8 in this case) you can try latest available using <meta http-equiv="X-UA-Compatible" content="IE=edge" />, but be aware that you may have rendering speed issues.

Although being aware of newer styles,this basic solution will also have scaling issues with different DPI (try using a high DPI computer and you will see some nasty formatting), that needs a more complex solution. You will need to research implementing IDocHostUIHandler and IOleClientSite on your form. DelphiDabbler.com has some info on that. But to be brief you will need to pass DocHostUIInfo structure and set the DOCHOSTUIFLAG_DPI_AWARE flag.