behavior:htmlarea (WYSIWYG editor) in h-smile core.

My initial idea was to implement behavior:htmlarea (WYSIWYG editor) as editing behavior that manipulates elements in existing DOM tree. This approach is not working for many reasons. Main reason is following: In presence of CSS the same rendering result (pixels in the view) can be achieved in many ways – by using various CSS attributes….

Implementation of Behaviors in Internet Explorer

Implementation below is a generalization of Ben Nolan’ idea of behaviors. Behaviors were implemented natively in Sciter and HTMLayout and here is their emulation for the Internet Explorer. Basic principle is simple, CSS declaration like this: li.myclass { prototype: MyBehavior; /* see var MyBehavior below */ } binds class of DOM elements with the “prototype…

HTML5, broken hopes.

I am tracking HTML and CSS design efforts on W3C last three years. My main area of interests is in CSS development as I think that in HTML/CSS/Script triade CSS as a technology is the weakest area. Next is the Script. And HTML appears as the most stable thing among these three. Since CSS1 we…

Browser wars.

Somewhere in this month discovered in logs of this site that total number of visitiors who use Gecko (FireFox and Mozilla) and Opera browers became first time larger than number of Internet Explorer users. Of course this site has specific auditorium but nevertheless…

CSS extensions in h-smile engine. Part II. Flex units.

Flex length units are "weights" used in distribution of free space along some direction. Example of the document with flex units: <html> <head> <style> div.outer { border:red 2px dashed; width:400px; height:250px; } div.inner { margin-left:30%%; width:50%; margin-right:70%%; height:100%%; background:gold; border:brown 4px solid; } </style> <head> <body> <div class=”outer”> <div class=”inner”></div> </div> </body> </html> This document…

HTMPrintMeasure or basics of HTML/CSS printing

PrintEx API of htmlayout has HTMPrintMeasure function with the following signature: HPRESULT HTMPrintMeasure(HTMPRINT hPrint, HDC hdc, int scaledWidth, int viewportWidth, int viewportHeight, int* pOutNumberOfPages); I would like to explain here meanings of its parameters as I am getting questions about printing and scaling pretty frequently. First fact that we need to know: pixels in HTML…