Type with intention
Font families, pixel sizes, colors, highlights, alignment and line spacing. Preview font choices on selected text.
From the first sentence to the final document.
Rich text, precise tables and
editable HTML —
in one JavaScript editor you can make your own.
A real editor. Select text, try a tool,
or bring a document of your own.
Sample documents are editable. Your edits are kept when switching samples during this visit.
The tools you reach for every day,
with room to go further.
Shape a paragraph, build a table or work directly with the markup. Keep your content in HTML from start to finish.
Explore the tool reference ↓Font families, pixel sizes, colors, highlights, alignment and line spacing. Preview font choices on selected text.
Insert rows and columns, merge cells, adjust borders and resize your layout. Try the dedicated table workspace.
Open table workspace ↗Move between visual editing and HTML source, with syntax highlighting and built-in code formatting.
Images, links, lists, page layout, find and replace, browser printing and HTML download, all within reach.
Add the stylesheet and script, choose an element and start editing. No API key or hosted editor account is required.
View JavaScript ↗View stylesheet ↓<link rel="stylesheet" href="https://xoditor.rameshmaharjan.info.np/dist/xoditor.min.css">
<script src="https://xoditor.rameshmaharjan.info.np/dist/xoditor.min.js"></script>
<textarea id="editor"></textarea>
<script>
const editor = new Xoditor('#editor', {
height: '480px',
defaultFont: 'Arial',
stickyToolbar: false,
autoSave: false
});
editor.setContent('<p>Make something good.</p>');
const html = editor.getContent();
</script>
Download the JavaScript and stylesheet above and serve them with your application. Copy the font stylesheet and its font files if you use the bundled Nepali
fonts. The stylesheet and script are also available under /dist/ on this site.
Create a textarea or div, then pass its selector to new Xoditor(). Keep the returned
instance to read or replace content.
| Option | Example | Purpose |
|---|---|---|
| height | '480px' | Editor height |
| defaultFont | 'Arial' | Starting font family |
| fonts | ['Arial', 'Kalimati'] | Font menu choices |
| toolbar | ['bold', 'italic', 'link'] | Core toolbar commands |
| ribbon | true | Ribbon layout |
| stickyToolbar | false | Toolbar scroll behavior |
| autoSave | false | Enable or disable local autosave |
| onChange | (html, editor) => {} | Receive content changes |
editor.getContent()editor.setContent(html)editor.setReadOnly(true)editor.destroy()Use the toolbar in the playground to explore these groups. Hover over a button for its name.
Bold · Italic · Underline · Strikethrough · Subscript · Superscript · Fonts · Sizes · Text color · Highlight · Clear formatting
Alignment · Line spacing · Ordered lists · Bulleted lists · Indent · Outdent · Horizontal rule · Page break
Insert table · Rows & columns · Merge & split · Borders · Cell alignment · Resize · Image upload · Links
Undo & redo · Find & replace · HTML source · Format HTML · Page layout · Print · Download HTML · Fullscreen · Zoom
Use the JavaScript constructor after the host element mounts and call destroy()
when it unmounts. These are manual integrations; this project does not ship dedicated
framework packages.
The editor accepts rich HTML pasted from the clipboard. Complex Word layouts, fonts and pagination can differ in a browser. Check important documents before saving or printing.
This playground has autosave disabled and does not submit document content to a server. Reloading the page resets it. Use HTML download to keep a copy.
Read HTML with getContent() and send it through your own API. Validate and
sanitize HTML on your server before storing or displaying content from untrusted users.
The print tool opens the browser print flow. Saving as PDF depends on the browser. Server-side PDF generation is a separate integration.