Back to Blog

June 28, 2026

Odoo’s OWL Playground Ditches CodeMirror for Monaco Editor With Full TypeScript Intelligence

The OWL framework playground now runs on Monaco Editor with version-aware TypeScript declarations, automatic imports, and IntelliSense for every OWL hook and component API — giving Odoo developers a VS Code-grade editing experience directly in the browser.

Monaco Editor running in the OWL playground showing TypeScript autocomplete suggestions for OWL hooks like useState, useRef, and useEffect

The OWL playground just got an upgrade that matters more than it might sound. The browser-based code editor — the one developers use to prototype OWL components, test reactive patterns, and share working examples — has swapped out CodeMirror for Monaco Editor. That’s the same editor engine that powers VS Code, and the integration goes deeper than just syntax highlighting.

TypeScript Declarations That Know Which OWL Version You’re Running

The standout feature is version-aware TypeScript support. When you select an OWL version in the playground, the editor automatically loads the matching TypeScript declaration files. Type useStateand you get accurate parameter signatures, return types, and documentation — specific to the version of OWL you’re actually targeting. Switch to a different version and the type information updates to match.

This solves a real problem. OWL’s API surface has evolved across versions — hooks have been added, prop validation has changed, the type system has gained new capabilities. Without version-specific declarations, developers were constantly second-guessing whether a particular API existed in their target version. Now the editor tells them immediately, with red squiggles and all.

Automatic Imports That Actually Work

The Monaco integration includes an import resolution system built specifically for the playground environment. Start typing a symbol — Component, useRef, xml— and the editor will detect that it comes from @odoo/owland add the import statement automatically. It also resolves imports from other files within the same playground project, so multi-file examples work without manually wiring up every dependency.

This is the kind of feature that separates a code editor from a text area. The previous CodeMirror setup treated OWL code as generic JavaScript. You could type syntactically valid code, but there was no understanding of what useState returned or whetheronWillStart accepted a callback or a promise. Monaco brings that semantic understanding to the browser.

A Shared Grammar Pipeline

Under the hood, the update also cleans up how syntax grammars are managed. The OWL project uses Shiki for syntax highlighting in its documentation site. Previously, the documentation and the playground maintained separate copies of the grammar transformation logic. Now there’s a shared pipeline that generates Shiki grammar files during the build step. Both the docs and the playground consume the same output, which means syntax highlighting stays consistent between code examples in the documentation and live code in the playground.

Why This Matters Beyond the Playground

OWL is the reactive component framework that powers Odoo’s entire web client. Every view, every form, every dashboard widget runs on OWL. The playground is where developers go to learn the framework, test ideas, and debug component behavior in isolation. Making that environment significantly more capable — with proper IntelliSense, type checking, and auto-imports — directly reduces the friction of building on top of Odoo’s frontend stack.

For teams building custom Odoo modules, this is also a practical prototyping tool. You can sketch out a component, verify it works against a specific OWL version, and share the playground link with your team — all without setting up a local development environment. The Monaco upgrade makes that workflow feel like working in a proper IDE rather than a glorified textarea.

Node.js Compatibility Lands at the Same Time

In a related change, OWL itself can now be imported in Node.js environments without crashing. Previously, importing the OWL package in a server-side context would throw a ReferenceErrorbecause the toggler module tried to create a DOM text node at module load time. That’s been fixed — the DOM access is now guarded behind a globalThis check that only runs when a document is actually available.

This matters for projects that use OWL’s non-rendering APIs (the reactivity system, the type validation system) in server-side or build-time contexts. The Odoo Spreadsheet project, for example, runs in environments where DOM availability isn’t guaranteed. Importing OWL no longer means opting into the browser.

Ready to experience Odoo AI?

Join hundreds of teams using DearERP to customize Odoo in minutes, not weeks. Plans start at $29/month.