CreateNewForm ignores html template

Hello,

I try to integrate a small webcore project in our special CMS. I have the possibility to integrate raw html code and so I load the script and execute the rtl.run(); It works fine so far. The code is executed and the webcore page is shown. But...

If I use the "normal" execution of my webcore app like this

  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TForm4, Form4);
  Application.Run;

the whole surrounding webpage is overridden and as body there remains only the webcore code. Ok, I read a few articles here about integration e.g. in WordPress. So I changed the code to

  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateNewForm(TForm4);   // this line new
  Application.Run;

and it works a lot better. The code is integrated in the CMS page, but...

Now there is only the code and the dfm-content inside the container of the CMS. The html template is totally ignored. If I use CreateNewForm in a very basic Webcore project instead of CreateForm the html template seems to be ignored, too. Do I miss something or is this by design? How would it be possible to integrate my webcore project in a container of my CMS (only a part of html inside the body of the page, no head-tag, no footer)?

Regards
Harald

It is by design that CreateNewForm() won't load the form HTML.
If this is a single form app, put the HTML for the form in the main project HTML