mobileFX WebKitX ActiveX
Advanced Topics / HTML5 Editor
In This Topic
    HTML5 Editor
    In This Topic

    There are some best practices when using WebKitX as an HTML5 Editor: 

    Disabling JavaScript download

    Disabling scripts downloading is advisable when using WebKitX as an Editor because JavaScript execution often messes with HTML5 styles, especially if you are using features such as Parallax Scrolling and JavaScript-aided responsive layouts.

     

    Detecting Edit Mode from JavaScript

    There are cases where your JavaScript code might need to detect if WebKitX is in Edit mode. To do that simply read window.__WEBKITX_EDITABLE__ variable. You should wrap Google Analytics and Google Tags Manager initialization code inside a conditional block and download Google scripts (or any other script) by URL, as illustrated below:

    Getting HTML Source

    To retrieve HTML5 source as a String you can use WebKitX.HTML property.