How to use design view in content page with layout and custom formatter

I have a layout and content page with this layout. I try to use a custom formatter:

function debug(object) {
    console.log('debug', typeof object, ':', object);

    return JSON.stringify(object);
}

for (const type of ['object', 'array', 'string', 'boolean', 'number']) {
    dmx.Formatters(type, { debug });
}

inside my content page:

<!-- Wappler include head-page="layouts/general" jquery_slim_33="cdn" is="dmx-app" id="database" appConnect="local" bootstrap5="cdn" fontawesome_5="cdn" -->

<header dmx-text="'test 2'.debug()">test 1</header>

<meta name="ac:route" content="/database">

I would expect “test 2” to be displayed in design view as it does in my browser.

I’ve try to summarize this issue with a simple scenario, we have this issue since day 1 but we’ve just recently launched an investigation to see if we can fix it.

Community Page
Last updated: