Is there a way to load HTML like `browser.loadContent` ?

Having problems with building or using the JCEF Java binding? Ask your questions here.

Is there a way to load HTML like `browser.loadContent` ?

Postby fmatz » Wed Mar 24, 2021 7:31 am

Hi,

I am working with the latest JCEF and would like to show some `on-the-fly` content sites:

.. browser.loadContent("<HTML>Test Content</HTML>");

Is there a way to solve this directly without `data/html,base64` convertings ?

Thanks and regards,
Fried
fmatz
Newbie
 
Posts: 5
Joined: Thu Jan 23, 2020 1:37 pm

Re: Is there a way to load HTML like `browser.loadContent` ?

Postby fmatz » Wed Mar 24, 2021 1:33 pm

Hi,

I am using the DataUri function from the demo and

it works also with `Umlaute`: .. JCefClientBrowser(DataUri.create("text/html", onTheFlyHTML)); .

Great and thanks,
Fried
fmatz
Newbie
 
Posts: 5
Joined: Thu Jan 23, 2020 1:37 pm

Re: Is there a way to load HTML like `browser.loadContent` ?

Postby fmatz » Thu Jun 03, 2021 3:08 am

The best way for me is creating ResourceHandler classes
incl. static defined HTML pages.

Fried
fmatz
Newbie
 
Posts: 5
Joined: Thu Jan 23, 2020 1:37 pm


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 2 guests