Simplicty and flexibility!


HTML output does not match the body layout.


Started by Markus
Search
You will need to Sign In to be able to add or comment on the forum!

HTML output does not match the body layout.

Hello DataEase forum!
Since I am unsure in HTML is here is my question: I have a memo field (HTML Edit) by I created a layout (Body), inclusive of the field variables of the DQL. This is simple and works flawlessly. In the Layout Body variables (placeholders) and the text are alsoall nice and straight with each other arranged.However, if the output is displayed in the advanced Webfield, the arrangement is no longer straight. Although there are all data availables but the layout is shifted. I suspect it has something to do with the text font or plaziere with the way the lyrics? What if a placeholder is sometimes blank? Then slips another layout? In my (body) Layout everything looks good but the result is it not (what you see is what you get ....).
In the sample applications, the variables in the body are only one among themselves. To view this is certainly good, but if you I have a slightly more detailed layout designs because some problems. In the examples, partly for the Body memo text and partly memo HTML Edit can be used. HTML edit would be easier for me.
Now how can I force the issue comply with my layout?
Thanks in advance for any help.

Markus


Written by Markus 07/11/15 at 07:02:22 Dataease [{8}]FIVE

Re:HTML output does not match the body layout.

Without seeing specifically what you try to do it is a little had to give specific advice, but this is a great opportunity to give some general ones at least.

As you might have guessed already, DE85 development (the product itself) is very much the same process as developing a DataEase application.

We start off in the direction we wanted to head, and then we amend and add to the product as we identify the need. 

Programming is of course combining different functions and functionalities to achieve what you want, and that is what we have improved most in DE85.

We also decided to focus on Rapid Development (both for us and you) rather than do everything ourselves from scratch.

HTMLEdit is simply a Control in DFW which allow you to use a "bog standard" CKEditor (Web based HTML editor) to edit the content of a Memo.

WebField (Memo based) then allow you to show any HTML stored in a Memo in a IE Browser Object.

The WebField doesn't care how the HTML has been created, and the HTMLEdit object doesn't care if you are going to use the HTML in the WebObject or as many times is the case for us via DG3 in general web.

To make it "more" WYSIWYG we use the CKEditors CSS for our WebField, so with any document created in HTMLEdit you should see very much the same as you do in HTMLEdit when presenting and printing the document.

Normal HTML is not position oriented, it use something called flow and a HTMLeditor use this by default as the focus is to create "word style" document ranter than web pages.

So if you want to create a FORM in HTML(Editor) you really need to use a Table and put the different items inside the table. 

You can of course also use ABSOLUTE postioning, but the HTMLeditor doesn't support this but when you replace a tag in the document you can replace it with more than the value of the tag, you can replace it with as much HTML code as you like...

DataEase has a history of being "Inflexible" - In DE8 we decided that the goal should be flexibilty and freedom for the developer.

HTML/CSS is exactly that and we have done nothing to limit it.

You can manipulate the WebObject the same way you can manipulate any browser. You can change the styling completely with CSS. You can for instance tell it to have slidebars or not with CSS.. (WebField doesn't and Advanced DOS). YOu can tell it to have a border, backround color, default font...everything with CSS.

You can link in libraries and style sheets.

One nice thing with HTML is that you can also bring it back to "dark ages".

If you wrap a <prev></prev> tag around your code, it will behave like a DOS document with a fixed size font, line feed and recognizing spaces etc.

In the image below we use the new Get() function to retrive the DQL and Layout of a DOS DQL. We then add some print styling code and a <prev></prev> around the body and the result is basically a DOS report...

With the combination of DQL, HTML, CSS you can very quickly achieve magic, but it is programming so you will have to taken a certain amount of responsibility to make it "look" right.

But when you get the hang of it is truely magic ;-)

PS! We will add our own WYSIWYG HTML based editor for creating Forms/Reports/DQLs and these will obviously be more attuned to giving you the quick result you are looking for, but as this is a work in progress we thought we should focus on quick "wins" and then the long wins later.


Written by DataEase 08/11/15 at 12:55:29 Dataease [{8}]FIVE

Re:Re:HTML output does not match the body layout.

May I have the possibility to download this sample? Thanks. 


Written by Marco Marchesi 06/03/19 at 13:51:50 Dataease [{8}]FIVE