Intlayer supports `md()` and `html()` content declarations. In Lit, compiled output is injected as raw HTML via the `unsafeHTML` directive.
```typescript fileName="src/app.content.ts" contentDeclarationFormat=["typescript", "esm", "cjs"]
import { md, t, type Dictionary } from "intlayer";
const appContent = {
key: "app",
content: {
// ...
editNote: md(
t({
en: "Edit `src/my-element.ts` and save to test **HMR**",
fr: "Modifiez `src/my-element.ts` et enregistrez pour tester **HMR**",
es: "Edite `src/my-element.ts` y guarde para probar **HMR**",
})
),
},
} satisfies Dictionary;
export default appContent;
```
Render the compiled HTML in your element:
```typescript fileName="src/my-element.ts" codeFormat="typescript"
import { LitElement, html } from "lit";
import { customElement } from "lit/decorators.js";
import { unsafeHTML } from "lit/directives/unsafe-html.js";
import { useIntlayer } from "lit-intlayer";
import { compileMarkdown } from "lit-intlayer/markdown";
@customElement("my-element")
export class MyElement extends LitElement {
private content = useIntlayer(this, "app");
override render() {
return html`
${unsafeHTML(compileMarkdown(String(this.content.editNote)))}
`;
}
}
```
> [!TIP]
> `String(content.editNote)` calls `toString()` on the `IntlayerNode`, which returns the raw Markdown string. Pass it to `compileMarkdown` to get an HTML string, then render it with Lit's `unsafeHTML` directive.