Help center

Building content right: Markdown, HTML and animation

What works in the two formats of the editor, what the screen removes and how long animated content may run. With examples to copy.

Content with the Document template is text that you write in the editor as Markdown or as HTML. You choose between the two in the Format field. Markdown is enough for most texts, HTML is what you need for your own design and for motion.

This guide shows what works in both formats, what the screen removes and how long animated content may run. Every example can be copied and pasted into the editor; the preview next to it shows right away how it looks on the screen.

Markdown

Markdown is plain text with a few characters for the layout.

Format text

  • # Title, ## Subtitle for headings
  • **bold**, *italic*
  • Start a line with - for a bullet list, 1. for a numbered one
  • New line: just press Enter
  • --- on its own line draws a divider
  • [Text](https://…) for a link
  • Insert an image: the Insert image button above the text field. To align it, put "center" or "right" after the image URL, e.g. ![Title](url "center") (left otherwise)

Icon shortcodes

A shortcode turns into a coloured icon button, the second form is also animated:

  • :phone: / :phone-ring: phone, rings
  • :link: / :link-pulse: link, pulses
  • :mail: / :mail-shake: letter, shakes
  • :calendar: / :calendar-flip: calendar, flips
  • :location: / :location-bounce: location, bounces

A time like 10:30 stays unchanged.

HTML inside Markdown

Markdown may contain raw HTML, such as a <div> or a <style> with an animation. The same rules apply as in the HTML format, including those on length. What the screen removes is described in the next section.

Example in Markdown
# Water outage

On **Tuesday** the water is off from 8 to 11 am.

- Please fill a jug beforehand.
- The property management answers questions :phone:

---

Thank you for your understanding.

HTML

In the HTML format you write an HTML fragment, without <html>, <head> and <body>.

Allowed formatting

Common tags work: <h1> to <h3>, <p>, <strong>, <em>, <ul> / <ol> / <li>, <a href="…">, <br>, <mark>. For layout you have <div> and <span> with class and style, and your own CSS goes into a <style>.

Images

Images from the media library only, meaning addresses under /cdn/assets/…. In the media library the Copy URL button copies the address of an image. The screen removes an <img> with a foreign address entirely, as it does an <image> in an SVG graphic.

Addresses in CSS

CSS may only load what comes from the media library as well. This applies to url() in any property, to image-set() and to @import, in a style attribute as in a <style> block. In addition, you may embed images and fonts directly as data:, such as a font with src: url(data:font/woff2;base64,…) in @font-face. An embedded font counts towards the size of the content in every language version; the content stays smaller if you upload the font (WOFF2, WOFF, TTF or OTF) to the media library and use it in @font-face with src: url(/cdn/assets/…). If the CSS contains any other address, the content cannot be saved, and the editor points this out beforehand in a note.

What is removed

Before showing content, the screen removes:

  • every <script>
  • <iframe>, <object> and <embed>
  • event handlers such as onclick or onload
  • links with javascript:
  • images, videos and sounds from foreign addresses (<img>, <video>, <audio>, <source>)
  • CSS with a foreign address: in a style attribute the whole attribute is dropped, in a <style> block the affected rule
  • in SVG graphics every reference to another file, such as fill="url(https://…)" or <use href="https://…">
  • anything that is not on the lists in the next section, such as <input>, <form> or the attribute background on a table

If your content contains any of this, the editor shows a note below the text field. Such content cannot be saved, and the rejection names the part. The one exception is an image in Markdown notation with a foreign address: it is saved, but does not appear on the screen.

Icon badges

Shortcodes like :phone: work in Markdown mode only. In HTML you write the badge directly as a <span> with two classes, and a third class sets it in motion:

  • Phone: q-ico q-ico-tel, ringing with q-anim-ring
  • Link: q-ico q-ico-link, pulsing with q-anim-pulse
  • Letter: q-ico q-ico-mail, shaking with q-anim-shake
  • Calendar: q-ico q-ico-cal, flipping with q-anim-flip
  • Location: q-ico q-ico-pin, bouncing with q-anim-bounce

For example <span class="q-ico q-ico-tel q-anim-ring">☎</span>.

Example in HTML
<div>
  <h2>Laundry room</h2>
  <p>The new schedule applies from <strong>1 November</strong>.</p>
  <ul>
    <li>Monday to Friday, 7 am to 9 pm</li>
    <li>Saturday, 8 am to 6 pm</li>
  </ul>
  <p><mark>The laundry room stays closed on Sundays.</mark></p>
  <p><span class="q-ico q-ico-tel">☎</span> The property management answers questions.</p>
</div>

Allowed elements and attributes

The screen only shows elements and attributes that are on the lists below. It removes everything else before display, and the editor points this out to you beforehand with a note. For an element such as <font> or <center> only the element is dropped, the text inside it stays. The lists are the same ones the screen uses for cleaning up.

SVG graphics are allowed, including gradients, masks and shadows. A reference may only point within the content, such as fill="url(#gradient)" or <use href="#dot">. The screen removes references to other files and images from foreign addresses.

Content with such parts cannot be saved, and the editor then stays open with your text. For content in HTML format, the button “Remove the flagged parts” below the note removes exactly those parts and then saves the content.

HTML elements

<h1><h2><h3><h4><h5><h6><p><br><hr><div><span><section><article><figure><figcaption><header><footer><nav><main><aside><address><strong><b><em><i><u><s><mark><small><sub><sup><code><pre><blockquote><abbr><cite><q><time><del><ins><kbd><ul><ol><li><dl><dt><dd><table><caption><thead><tbody><tfoot><tr><th><td><a><img><video><audio><source><track><style>

SVG elements

<svg><g><defs><symbol><use><title><desc><path><rect><circle><ellipse><line><polyline><polygon><text><tspan><clipPath><mask><pattern><marker><linearGradient><radialGradient><stop><image><filter><feDropShadow><feGaussianBlur><feOffset><feFlood><feComposite><feMerge><feMergeNode><feBlend><feColorMatrix>

Attributes on every element

classidtitlelangdirrolestylearia-…data-…

Additional attributes of individual HTML elements

  • <a>: hrefxlink:hreftargetrel
  • <img>: srcaltwidthheight
  • <video>: srcposterwidthheightcontrolsautoplayloopmutedplaysinlinepreload
  • <audio>: srccontrolsautoplayloopmutedpreload
  • <source>: srctype
  • <track>: srckindsrclanglabeldefault
  • <ol>: startreversedtype
  • <li>: value
  • <th>: colspanrowspanscope
  • <td>: colspanrowspan
  • <time>: datetime
  • <del>: datetime
  • <ins>: datetime

Attributes on every SVG element

xmlnsxmlns:xlinkviewBoxpreserveAspectRatiotransformxywidthheightcxcyrrxryx1y1x2y2fxfydxdydpointspathLengthfillfill-opacityfill-rulestrokestroke-widthstroke-linecapstroke-linejoinstroke-dasharraystroke-dashoffsetstroke-miterlimitstroke-opacityopacitycolordisplayvisibilityvector-effectpaint-orderfont-familyfont-sizefont-weightfont-styletext-anchorletter-spacingword-spacingtext-decorationdominant-baselinealignment-baselinebaseline-shiftclip-pathclip-ruleclipPathUnitsmaskmaskUnitsmaskContentUnitsfilterfilterUnitsprimitiveUnitsmarker-startmarker-midmarker-endmarkerWidthmarkerHeightmarkerUnitsrefXrefYorientpatternUnitspatternContentUnitspatternTransformgradientUnitsgradientTransformspreadMethodoffsetstop-colorstop-opacityinin2resultstdDeviationflood-colorflood-opacityoperatork1k2k3k4modetypevalues

Additional attributes of individual SVG elements

  • <use>: hrefxlink:href
  • <image>: hrefxlink:href

Attributes with an address

  • <a href><a xlink:href>: A link with http, https, mailto, tel or a relative address. Any other target is removed, the link text stays.
  • <img src><video src><audio src><source src><track src><image href><image xlink:href>: Only an address from the media library (/cdn/assets/…). Otherwise the whole element is removed.
  • <video poster>: Only an address from the media library (/cdn/assets/…). Otherwise only the attribute is removed.
  • <use href><use xlink:href>: Only a reference within the content such as #dot. Otherwise the attribute is removed.
  • every SVG attribute: url() only as a reference within the content such as url(#gradient). If it holds any other address, the attribute is removed.
  • style: Addresses only from the media library, plus images and fonts as data:. The details are in the HTML section under “Addresses in CSS”.
Example: an SVG graphic with a gradient and a reference within the content
<div>
  <svg viewBox="0 0 320 80" role="img" aria-label="Welcome">
    <defs>
      <linearGradient id="gradient">
        <stop offset="0" stop-color="#12296b" />
        <stop offset="1" stop-color="#1a5c3a" />
      </linearGradient>
      <circle id="dot" r="10" />
    </defs>
    <rect width="320" height="80" rx="12" fill="url(#gradient)" />
    <use href="#dot" x="40" y="40" fill="white" />
    <text x="64" y="47" fill="white" font-size="22">Welcome</text>
  </svg>
</div>

Animation and length

Motion comes from CSS animations alone, in a <style> or in the style attribute, because the screen removes scripts. These animations determine the length of a content item.

How it is measured

  • An infinite loop (infinite) counts with its duration. Its delay only shifts where in the loop it starts and does not count.
  • A finite animation counts with delay plus duration times iterations: animation: title 5s 2s 3 gives 17 seconds.
  • If the content has several animations, the longest one counts.
  • The motion of the icon badges (classes starting with q-anim-) does not count.
  • If the content has several language versions, the longest of them counts.

The limit

Animated content may be at most 30 seconds long, the same limit as for a video. The editor shows the measured length below the preview and blocks saving while it is above the limit. A video is trimmed to the limit on upload, whereas animated content that is too long is rejected on saving: trimmed, its ending would silently be missing on the screen.

If a time value uses var(), calc() or a related function such as min(), max() or clamp(), the length cannot be determined, and the content is rejected on saving as well. Write duration and delay as fixed values in s or ms, or state the length yourself with data-duration.

On the screen

If the measured length is longer than 12 seconds, the content holds its zone for exactly one pass, like a video, and then the next content follows. A shorter animation holds nothing: the content changes at the usual pace, and a small loop such as a pulsing arrow simply keeps running while it is visible. This applies in every zone of the screen.

Example: a title fades in once, two lines alternate in a loop of 20 seconds
<div class="notice">
  <style>
    .notice h2 { animation: fade-in 2s ease-out 1s both; }
    .notice .alternate { position: relative; }
    .notice .alternate p { animation: show 20s linear infinite; }
    .notice .alternate p + p { position: absolute; top: 0; animation-delay: -10s; }
    @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
    @keyframes show {
      0%, 45% { opacity: 1; }
      50%, 95% { opacity: 0; }
      100% { opacity: 1; }
    }
  </style>
  <h2>Autumn clean-up on Saturday</h2>
  <div class="alternate">
    <p>We meet at 9 am in the courtyard.</p>
    <p>Gloves and bags are provided.</p>
  </div>
</div>

Shared styles through a stylesheet

When several language versions or several contents need the same styles, put them once into a stylesheet in the media library. Without one, every language version carries its own copy of the <style> block, and a change to the style has to be repeated in every copy.

How to use it

  1. Write the shared rules into a file ending in .css, at most 100 KB, and upload it to the media library.
  2. The button Copy @import line on the stylesheet's tile copies the line <style>@import url("…");</style> with the file's address.
  3. Paste this line into the HTML of every language version that needs the styles. Rules that only apply to one language stay in that language's own <style> block.

What the stylesheet may load

The same address rules apply as in the content: files from the media library under /cdn/assets/…, for example a font in @font-face, plus images and fonts as data:. An @import may not stand in the stylesheet itself. If it loads anything else, the media library does not accept the file and names the reason.

Changing a stylesheet

A file in the media library stays exactly as it was uploaded. A changed stylesheet is therefore uploaded as a new file and gets a new address. Then put the new address into the @import line of every content that should show the new styles. A content with the old address keeps showing the old styles.

Example: loading a stylesheet from the media library, you copy the address on its tile
<style>@import url("/cdn/assets/…");</style>
<div class="notice">
  <h2>Autumn clean-up on Saturday</h2>
  <p>We meet at 9 am in the courtyard.</p>
</div>

Stating the length with data-duration

With the attribute data-duration you set the length of a content item yourself, for example <div data-duration="20s">. The statement wins over the measured animations, even if they would be longer or could not be determined; var() and calc() in the animations then no longer matter for the length. It also applies to content without any animation, which then stays in its zone for exactly that long. Unlike a measured length, a stated length holds the zone even when it is below 12 seconds.

Where it has to go

On the outermost element, meaning the first element in the source. A <style>, a <script> and comments before it are skipped. In Markdown the first HTML element in the raw text counts, even if a heading with # stands above it. On an inner element the statement has no effect.

Valid values

A number with s or ms, for example 20s, 1500ms or 12.5s. A number without a unit, a space between number and unit, a comma instead of the point and the value zero are invalid. With an invalid value the editor blocks saving and names the value. The limit of at most 30 seconds applies to the statement as well.

Example in HTML: 20 seconds without animation
<div data-duration="20s">
  <h2>Residents' meeting</h2>
  <p>Thursday, 7 pm, in the common room.</p>
</div>
Example in Markdown: the statement on the first HTML element
<div data-duration="15s">

# Lift under maintenance

Please use the stairs until Friday.

</div>

Sizes and colours

Anyone who writes a notice in their own HTML, by hand or with an AI assistant, usually runs into the same questions: how big is the area, what does vh mean in it, and which colour do the headings get? The answers are here.

How big the area is

A notice appears in the info zone and is therefore smaller than the screen. From top to bottom the screen shows:

  • the status band, about 55 pixels high on a Full HD screen in landscape
  • the tile strip, only on a touch screen with tiles, 8 % of the screen height and at least 68 pixels
  • the zones side by side, with a narrow margin around and between them. Each one is half the screen wide, 70 or 30 % when one side is enlarged, and the full width when there is only one zone.

Inside the zone more space goes:

  • the tabs at the top, about 56 pixels per row, up to two rows
  • the colour bar of the theme, 1.5 % of the zone height and at least 6 pixels
  • the logo, if the theme has one, up to 12 % of the zone height
  • a padding of 8 to 16 pixels around your content
  • the take-away QR code in the bottom right corner, drawn on top of your content, about a sixth of the zone's shorter edge in size

Content gets the whole screen only on an ad-only screen in full screen, and even there a narrow status band remains. A notice in the info zone always has less room.

vw and vh mean the whole screen

100vw and 100vh are the width and height of the whole screen, never those of the zone. On a portrait screen vw is the real width as well. A box with height: 100vh or min-height: 100vh is therefore always taller than the zone. It overflows at the bottom, and the screen then shrinks the text or fades out the bottom part softly.

For a panel that fills the zone, use min-height: 100%. Percentages refer to the zone without its padding, and the box still grows when the text gets longer. height: 100% fixes it to exactly the height of the zone.

Example: a panel that fills the zone
<style>
  .welcome { min-height: 100%; box-sizing: border-box; background: #12296B; color: #fff; }
  .welcome h1 { color: #fff; }
</style>
<div class="welcome"><h1>Welcome</h1></div>

Sizing text to the screen

The variables --screen-w and --screen-h hold the width and height of the screen. With them a font grows with the screen, for example with font-size: calc(var(--screen-w, 100vw) * 0.02). In the portal preview the two are not set. Always write them with a fallback, so var(--screen-w, 100vw) instead of var(--screen-w).

When the notice does not fit the zone

What reaches below the zone is not cut off. The screen fades it out softly at the bottom edge, and the background behind it shows through the faded part, white in the portal preview.

Before that the screen shrinks the text by up to 20 %. This only scales the font size the screen sets itself, and whatever you size in em from it. Sizes in px, vw, vh or from --screen-w and --screen-h stay as they are, so a notice built that way never gets smaller. Size it for the smallest zone it can run in, or build it as an SVG like the pattern further down.

What the screens can do

  • The screens run Chromium 101. Container queries (container-type, cqw, cqh) do not exist there yet, so a rule using them never applies on the screen, even when it works in the browser on your computer.
  • A media query on orientation, vw and vh measure the whole screen, never the zone. The zone can have quite a different shape from the screen: on a landscape screen the small side of a 70 to 30 split is taller than it is wide, and in portrait a 30 % zone is about 320 pixels wide and more than 1600 pixels tall.
  • Emoji are unreliable on the screens. Depending on the device the font for them is missing, and a box or a dot appears instead of the character. Use an image from your media library for symbols, or draw them as SVG.

A pattern that fits every zone

A notice that stays fully visible in every zone shape is built as one single SVG with a viewBox. The outer element gets position: relative and height: 100%, the <svg> inside it position: absolute with width: 100% and height: 100%. The SVG then scales as a whole to the zone, in portrait and landscape alike, and never overflows it.

  • With the default (preserveAspectRatio="xMidYMid meet") everything stays visible, and free margins show the background of the outer element. With slice the SVG fills the zone and crops at the edges instead.
  • Insert images with <image href> from your own media library. The screen does not load an address from anywhere else.
  • Text in an SVG does not wrap. Set each line as its own <text>.
Example: a notice as an SVG that fills any zone
<style>
  .poster { position: relative; height: 100%; background: #12296B; }
  .poster svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
</style>
<div class="poster">
  <svg viewBox="0 0 1080 1080">
    <image href="/cdn/assets/…/courtyard.jpg" width="1080" height="720" preserveAspectRatio="xMidYMid slice" />
    <text x="540" y="860" text-anchor="middle" font-size="96" font-weight="700" fill="#fff">Courtyard party</text>
    <text x="540" y="980" text-anchor="middle" font-size="56" fill="#fff">Saturday from 2 pm</text>
  </svg>
</div>

Colours from the theme

Text colour, background and font come from the organization's theme. The headings h1 to h3 get the theme's primary colour through the variable --accent, which is the navy #12296B without a theme. If you set a dark background, give the headings a colour too, otherwise the screen shows navy text on a navy background.

Your own CSS always wins over these defaults, whether as a rule in a <style> or in the style attribute. Next to --accent the brand colours are available as variables, for example --q-navy, --q-red, --q-green, --q-terracotta, --q-ink and --q-paper.

What applies when you set nothing

ElementDefault
Textcolour and font from the theme (near black and Arial without a theme), size 1.8 % of the screen width, line height 1.5
Backgroundfrom the theme (white without a theme), across the whole zone
h1, h2, h3the theme's primary colour through --accent (#12296B without a theme), size 2.4em, 1.8em and 1.17em, line height 1.1, bottom margin 0.4em
p, ul, olbottom margin 0.8em
abrowser default. On the screen a link becomes plain text, on the take-away page it stays a link.
imgat most as wide as the area and 80 % of the screen height, corners rounded by 8 pixels
Tables, quotes, code, rulesbrowser default

If content does not fit into the zone, the screen shrinks its own font size by up to 20 %, as described above. On a phone, that is on the take-away page, the text is 4.3 % of the window width.

Rules under a class of your own

A <style> applies to the whole page of the screen and not only to your notice. A rule that names only h1 can therefore reach the other zone too. Give your outermost element a class of its own and write every rule below it, so .welcome h1 instead of h1.

Avoid the classes the screen uses and styles for itself: slide, tabs, tab, title, lead, kicker, hint, badge, rows, md-content and all that start with status.

The AI assistant's preview

When an AI assistant shows you a notice as a preview, it draws it across the whole screen, without status band, tile strip, tabs and QR code. A layout that just fits there gets cut on a real screen. Leave some room at the bottom and the sides, and plan for the smaller area described at the start of this section.

Back to the help center