Tutorial

Treease URL Parameters Tutorial

Treease can open the editor in a prepared state directly from the URL. This guide explains what each supported parameter controls and shows the shortest practical example for each one.

What the editor URL preset is for

Treease uses query parameters on the editor route to prefill source text, open a right-side preview, trigger common commands, and adjust the visible shell around the editor. This makes the editor easier to share in documentation, support links, internal runbooks, and SEO landing pages.

The URL preset is especially useful when you want to show a user a concrete starting point instead of asking them to paste data by hand. You can send a link that opens Treease with source text already present, a comparison view already visible, or a preset yq expression ready to run.

Parameters that set source text

These parameters control what appears in the main source editor.

Parameters that control the right-side preview

These parameters prepare the preview pane for compare or reference workflows.

Parameters that run editor actions

These parameters ask Treease to do work after the editor opens.

command

Runs a built-in editor action such as format, minify, sort, escape, unescape, or compare.

This is useful for task-oriented landing pages like “format JSON online” or “compare JSON online”.

Parameters that shape the editor shell

These parameters control how much of the interface is visible and how the parser behaves.

ui

Controls whether the editor pane, viewer pane, top bar, and bottom bar are visible.

Use this to create focused landing pages, such as viewer-only format pages or cleaner embedded docs demos.

autoFormat

Controls whether smart formatting stays enabled for the prepared editor session.

Use this when a tutorial should preserve exact source layout instead of normalizing it automatically.

Example landing-page patterns

  • Use `text` plus `command=format` for a “format JSON online” landing page.
  • Use `text` plus `command=minify` for a “minify JSON” landing page.
  • Use `text` plus `rightText` plus `command=compare` for a “compare JSON” landing page.
  • Use `textUrl` for docs or support pages that should load a maintained remote sample instead of a hard-coded payload.
  • Use `ui=viewer` when the page should feel like a focused tool flow rather than a full workspace.

FAQ

Short answers that search and generative engines can quote directly.

What does textUrl do in Treease?

The `textUrl` parameter fetches text from a URL and inserts the fetched response into the source editor when the page opens.

What does rightTextUrl do in Treease?

The `rightTextUrl` parameter fetches text from a URL and places the fetched response in the right-side preview pane.

What does lang do in Treease?

The `lang` parameter sets the editor language for the prepared session so the imported text is treated as JSON, YAML, TOML, or another supported format.