Texy Editor
Texy markup editor for web forms: toolbar, in-browser preview, image dialog and plugins, with optional Markdown. TypeScript without jQuery, the successor to Texyla.
Texy Editor is a Texy markup editor for web forms, written in TypeScript. Websites built on Nette often store articles, comments and descriptions in Texy markup. An editor types text with asterisks and quotes into a form and needs a button toolbar, a preview and a dialog for inserting images. Texy Editor adds all of this to a plain textarea field with one line of JavaScript.
A successor to Texyla without jQuery
Texy is a markup language by David Grudl, the author of Nette. Compared with Markdown it adds modifiers, underlined headings, images with dimensions and Czech typography rules. Until now it was edited with Jan Marek's Texyla, but that editor is built on jQuery and has not been developed for years. Texy Editor is rewritten in TypeScript and its core has no runtime dependencies. Your project gains no jQuery or anything else that would have to be maintained for the sake of one form field.
What editors and developers get
- A configurable toolbar. Buttons insert bold, italics, headings, lists, links, images, tables, code, text colour, special characters or alignment. Button groups and custom buttons are set in the configuration.
- Preview without a server request. The parser runs in the browser, so the preview redraws after a configurable delay (300 ms by default) and puts no load on the server. If you want output exactly from server-side Texy, set the URL in
previewPath. - Three views. Edit, preview and a side-by-side split view, plus full screen on F11.
- Images as in a word processor. The image dialog sets width, height, alignment, link and caption. Since version 0.6.0 an image can be pasted from the clipboard or dragged in with the mouse; uploading to the server is handled by your own
uploadHandlerfunction. - Keyboard. Ctrl+B, Ctrl+I, Tab indentation and undo history with a configurable number of steps. All shortcuts can be remapped.
- Your site's look. Light and dark themes; colours change through CSS variables, so the editor picks up the site's colours without overriding styles.
- Czech in the interface. The interface is in Czech and English; another language is added with a dictionary.

imageLinkAutoFill option enabled, which pre-fills the link with the image URL.Parser, typography and plugins
The TexyParser parser can also be used without the editor, for example to preview a comment elsewhere on the page. It handles Texy inline and block elements, including tables, code blocks, quotes, abbreviations and class, style and ID modifiers. For typography it turns two hyphens into an en dash, arrows such as --> into an arrow character, "10 x 20" into "10×20", "(c)" into ©, three dots into an ellipsis, and inserts a non-breaking space after one-letter prepositions, as Czech typography requires.
Five plugins are bundled: YouTube video embedding, numbered smileys, BBCode tags, an image with a link, and redirecting outbound links through your own URL. A custom plugin hooks into three processing phases: before parsing, during the inline pass and over the finished HTML. Inserted HTML is protected by placeholders so that a later pass does not break it; as an example, the README shows a plugin that turns an @jméno mention into a profile link.
Since version 0.3.0 the editor can also switch to Markdown. Since version 0.5.0 Markdown lives in a separate entry point, @nks-hub/texy-editor/markdown, which bundles the markdown-it library; the editor core thus stayed dependency-free. If you do not need Markdown, it is not in your bundle.

Where it fits
- The admin of a Nette website where content is stored in Texy and has so far been written with Texyla.
- Discussions and comments with a preview before posting, optionally with BBCode and smileys through plugins.
- A form where the author chooses between Texy and Markdown.
Output security
The parser escapes text and drops links with a javascript: URL, and tests check this separately. The /--html block, however, passes HTML through unchanged, as the Texy syntax defines. If you render text from untrusted users, sanitise the output on the server as well, or leave the conversion to server-side Texy.
Status and size
The latest release is 0.6.1 from 9 August 2026. The package contains ES module and CommonJS builds and type declarations. Its texy-editor.js file is 95 kB, 22 kB after gzip, and the styles are 10 kB. The separate Markdown entry point is 153 kB. According to the README there are 677 tests, run in Vitest. A version number below one means the configuration may still change.
Getting started
npm install @nks-hub/texy-editor
import { TexyEditor } from '@nks-hub/texy-editor';
import '@nks-hub/texy-editor/css';
const editor = new TexyEditor('#my-textarea', {
language: 'cs',
theme: 'light',
livePreview: true,
});
You can try the editor without installing it on the demo page. The package is on npm as @nks-hub/texy-editor.
Source code
The code is on GitHub in the nks-hub/texy-ts-editor repository under the MIT licence.