We are here to help
From pre-adoption technical review to issues in production,
the DEXTSOLUTION engineering team responds quickly.
How to reach us
Contact us through the channels below and we will reply within one business day.
Licensing
Quotes, licence types, volume discounts, and other purchasing questions
📋 Copy email addressTechnical support
Installation, integration, bug reports, API usage, and other technical questions
📋 Copy email addressDeveloper FAQ
From installation to advanced features — the questions we are asked most, by category.
Please load the two required files: one before the closing <head> tag and one before the closing <body> tag.
<!-- 1. CSS (inside head) -->
<link rel="stylesheet" href="dist/webeditor.min.css">
<!-- 2. JS (before closing body) -->
<script src="dist/webeditor.min.js"></script>
<!-- only if you need MS Word import -->
<script src="dist/plugins/wordimport-native.min.js"></script>
The editor supports current versions of Chrome, Edge, Firefox and Safari. Core editing needs at least Chrome / Edge 90, Firefox 88 or Safari 14. Internet Explorer is not supported.
- Document import (DOCX, HWPX, XLSX, PPTX) uses the browser's built-in decompression (
DecompressionStream) — Chrome / Edge 80, Firefox 113, Safari 16.4 or later. - OCR works on desktop Chrome / Edge 91+, Android Chrome and Samsung Internet, and Safari 16.4+ on iOS and macOS. In unsupported browsers, the menu is simply not shown.
file://. Please serve the page from a web server.Add a container element in your HTML and call new WebEditor() from JS.
<!-- HTML -->
<div id="editor"></div>
<!-- JavaScript -->
<script>
const editor = new WebEditor('#editor', {
height: 400,
placeholder: 'Start typing…'
});
</script>
The container can be a div, a CSS selector such as '.my-editor', or a DOM element passed directly.
In a bundler environment (Webpack, Vite, and so on), use the ESM bundle.
// ESM (recommended)
import WebEditor from './dist/webeditor.esm.js';
// CommonJS
const WebEditor = require('./dist/webeditor.js'); // the UMD bundle also works with CommonJS
dist/webeditor.d.ts alongside it. You can reference it through typeRoots in tsconfig or a /// <reference> directive.- Check in DevTools → Network that
webeditor.min.csshas loaded. - Make sure you initialise the editor after the container (
#editor) exists in the DOM; we recommend doing so afterDOMContentLoaded. - Check that
heightis passed as a number (px) or a string ('400px') - If a parent has
display:none, the height can stay 0 even after you reveal it. In that case, please calleditor.setHeight(400)again once it is visible.
Calling destroy() restores the DOM to its original state and removes every event listener.
editor.destroy();
// setting the editor variable to null afterwards is recommended
editor = null;
In an SPA, please make sure to call it when the component unmounts to avoid memory leaks.
Yes. Create an independent instance for each container.
const editor1 = new WebEditor('#editor-1', { height: 300 });
const editor2 = new WebEditor('#editor-2', { height: 200, readOnly: true });
// reach instances through the static API
const model0 = WebEditor.getAPIModelByIndex(0); // the first instance
const html = model0.getHTML();
license, or set it once globally with WebEditor.defaultLicense or window.WebEditorLicense. (See the Licensing tab.)Since v2.6.8 the menu bar is on by default. Use menubar: false to hide it, or pass an array of group objects ({ label, items }) to build the menus yourself. (Up to v2.6.7.2 it was off by default and turned on with menubar: true.)
// hide the menu bar (on by default since v2.6.8)
new WebEditor('#editor', { menubar: false });
// build your own menus — an array of group objects (design and download one on the menu bar setup page)
new WebEditor('#editor', {
menubar: [
{ label: 'File', items: [
{ label: 'New document', cmd: 'newDocument' },
{ sep: true },
{ label: 'Print', cmd: 'print' }
] }
]
});
The toolbar can be hidden or shown at runtime with showToolbar(false).
By default it stays on one line rather than wrapping, and the overflow goes into a » button popup at the right end. When you widen the window, everything returns to the toolbar automatically. Folding happens one icon at a time, so as much as fits stays visible.
// default — overflow folds into the » popup
new WebEditor('#editor', { toolbarOverflow: true });
// to wrap onto the next line as before
new WebEditor('#editor', { toolbarOverflow: false });
If you want a different icon layout on narrow screens, toolbarResponsive sets a layout per width breakpoint, and the two options work together.
Pass an array of plugin names to the plugins option.
// pick from the built-in plugins (11)
new WebEditor('#editor', {
plugins: ['format', 'image', 'table', 'link', 'emoji',
'video', 'sourceview', 'insert', 'find', 'docbg', 'shape']
});
// add Word import (requires the external bundle)
new WebEditor('#editor', {
plugins: ['format', 'image', 'table', 'link',
'emoji', 'video', 'sourceview', 'insert',
'find', 'wordimport']
});
The default inserts a <p> paragraph. To switch to <br>:
new WebEditor('#editor', {
enterKey: 'br' // default: 'p'
});
'p'. 'br' suits simple note-taking where paragraph structure is unnecessary.new WebEditor('#editor', {
pastePlainText: true // treat every paste as plain text
});
For a one-off plain paste, the Ctrl+Shift+V shortcut also works.
// set through initialization options
new WebEditor('#editor', {
defaultFont: 'Malgun Gothic', // default: 'Malgun Gothic'
defaultFontSize: 12 // default: 10 (in pt)
});
// change at runtime
editor.setDefaultFont('Segoe UI');
editor.setDefaultFontSize(16);
new WebEditor('#editor', {
hyperLinkDefaultTarget: '_blank' // '_self' | '_blank' | '_top' | '_parent'
});
Unless the user changes the target in the link dialog, this value is applied.
document.getElementById('submit-btn').addEventListener('click', () => {
const html = editor.getHTML(); // the body as an HTML string
// put it in a hidden input and submit
document.getElementById('content-field').value = html;
document.getElementById('my-form').submit();
});
// when you only need plain text
const text = editor.getText();
// call setHTML in the onInit callback — there is no 'ready' event
const editor = new WebEditor('#editor', {
height: 400,
onInit: (ed) => {
ed.setHTML(savedHtmlFromServer);
ed.resetModified(); // reset the modified flag (so change detection is not thrown off)
},
});
resetModified(), isModified() returns true immediately after setHTML.if (editor.isEmpty()) {
alert('Please enter some content.');
return;
}
// or check it yourself
const html = editor.getHTML();
const text = editor.getText().trim();
if (!text) { /* empty */ }
isEmpty() ignores whitespace, line breaks, and to decide whether there is real content.
// basic use (removes script and on* handlers)
const safeHtml = editor.getSafeHTML();
// with options
const safeHtml = editor.getSafeHTML({
stripScript: true,
allowedTags: ['p','br','strong','em','u','a','img','table','tr','td'],
allowedAttrs: ['href','src','alt','width','height'],
imageRewriter: (src) => {
// base64 image → a CDN URL
if (src.startsWith('data:')) return '/img/placeholder.png';
return src;
}
});
// set at initialization
const viewer = new WebEditor('#viewer', {
height: 300,
readOnly: true // blocks all keyboard and mouse input
});
viewer.setHTML(savedContent);
// switch at runtime
editor.setReadOnly(true); // lock
editor.setReadOnly(false); // allow editing
console.log(editor.isReadOnly()); // true/false
Every setter returns this, so chaining works.
editor
.setHTML('<p>Hello.</p>')
.setReadOnly(false)
.setHeight(500)
.setDefaultFont('Segoe UI')
.focus();
// switch tabs — by index or by name
editor.setTab(1); // 0=WYSIWYG, 1=HTML source, 2=Preview
editor.setTab('html'); // 'edit' | 'html' | 'preview' (case-insensitive, aliases allowed)
// read the current tab
const tabIndex = editor.getActiveTab(); // 0 | 1 | 2
const tabName = editor.getActiveTab(true); // 'edit' | 'html' | 'preview'
// listen for tab changes (chainable: setTab returns this)
editor.on('tabChange', (index) => {
console.log('tab switched:', ['WYSIWYG', 'HTML', 'Preview'][index]);
});
With imageResize set, only images wider than the limit are re-encoded at fewer pixels (the aspect ratio is preserved, and images are never upscaled). The smaller result goes into both the base64 in the body and uploadHandler, so the file size is reduced everywhere.
new WebEditor('#editor', {
imageResize: {
maxWidth: 600, // anything 600px or narrower stays original
quality: 0.85, // JPEG / WebP quality
formats: ['image/jpeg','image/png','image/webp'],
onLargerResult: 'original' // use the original if the result is bigger
}
});
editor.on('imageResized', e => console.log(e.originalWidth, '→', e.width));
maxImageWidth, which limits only the displayed size (CSS) and leaves the uploaded file unchanged. To reduce file size, use imageResize.Register an async function as the uploadHandler option. When it returns a URL, the base64 image is replaced with it automatically.
new WebEditor('#editor', {
uploadHandler: async (file, headers) => {
const formData = new FormData();
formData.append('file', file);
const resp = await fetch('/api/upload', {
method: 'POST',
body: formData,
headers: headers || {} // CSRF headers included automatically
});
if (!resp.ok) throw new Error('Upload failed');
const json = await resp.json();
return json.url; // the return value replaces the image src
}
});
new WebEditor('#editor', {
// option 1: read it from a cookie
csrfCookie: 'csrftoken', // the cookie name
// option 2: set the header yourself
uploadHeaders: {
'X-CSRF-Token': document.querySelector('meta[name=csrf-token]').content,
'X-Custom-Header': 'value'
},
uploadHandler: async (file, headers) => {
// the headers argument already contains the above
const resp = await fetch('/api/upload', {
method: 'POST',
body: new FormData()...,
headers
});
return (await resp.json()).url;
}
});
// right after the image is attached to the editor DOM (still base64)
editor.on('imageInserted', ({ src, file, node }) => {
console.log('inserted image:', src.substring(0, 30));
});
// right after uploadHandler finishes and the URL is swapped in
editor.on('imageUploaded', ({ src, file, node }) => {
console.log('upload finished:', src); // the server URL
});
new WebEditor('#editor', {
maxImageWidth: 800 // in px; default null (no limit)
});
Inserted images get a CSS max-width:800px, so only the displayed size is reduced (the height keeps its ratio). The file itself is unchanged; to reduce the file size, please use imageResize.
You can double-click the image, or select it and open the image properties dialog from the right-click menu.
- Caption: produces a
<figure><img><figcaption>structure - Hyperlink: wraps it as
<a href="..."><img></a>, with target support
// insert an image from code
editor.insertImage('https://example.com/image.jpg');
// the change event fires whenever the content changes
editor.on('change', (html) => {
// debouncing is recommended (say, a 1-second delay)
clearTimeout(window._saveTimer);
window._saveTimer = setTimeout(() => {
localStorage.setItem('draft', html);
}, 1000);
});
// or use the built-in AutoSave
new WebEditor('#editor', {
autoSave: {
interval: 30000, // every 30 seconds
storageKey: 'draft',
unloadWarning: true, // warn before leaving the page
onSave: (html) => console.log('auto-saved')
}
});
// register a listener
const handler = (html) => console.log(html);
editor.on('change', handler);
// remove one listener
editor.off('change', handler);
// remove every listener for that event
editor.off('change');
change(html)— the content changedfocus/blur— focus gained / lostselectionchange— the selection changedtabChange(index)— tab switched (0/1/2)resize({width, height})— the editor was resizedimageInserted({src, file, node})— image attached to the DOMimageUploaded({src, file, node})— upload finished and the URL was swapped inimageResized({file, originalWidth, width, …})—imageResizeactually downscaled an imageimageRejected·beforeImageAdd·fileDropBlocked— image limits and drop blocking (v2.6.8)zoom({ratio})— zoom level changedfullscreen(on)/uiTemplateChange(name)/iconThemeChange(name)— UI switcheslanguagechange(lang)—setLanguage()finishedguard(result)— the pre-submit check found banned words or personal datapageGuideChange·pageGuideOverflow— A4 print-width guide (v2.6.8)autoSaveReady·autoSaveFailed·storageCleared— autosave and storage (v2.6.8)ocrStart·ocrProgress·ocrPage·ocrDone·ocrCancel·ocrError— OCR (whenocris loaded)approvalform:change({fields, changed})— approval-form recalculation finished (whenapprovalformis loaded)error({context, error})— an internal error (a failed upload or import, for example)
onInit callback option. ready, input, paste, undo and redo are not emitted. change only tells you that the document changed. To watch specific elements, please use editor.watch(selector, handler) (v2.6.6).editor.on('error', ({ context, error }) => {
console.error(`[${context}] error:`, error.message);
if (context === 'uploadHandler') {
alert('The image upload failed. Please check your network connection.');
}
});
context values include 'uploadHandler' (upload), 'docxImport' · 'hwpImport' · 'hwpxImport' · 'xlsxImport' · 'pptxImport' · 'pdfImport' (import), 'plugin:<name>', 'autoSave.*' (e.g. 'autoSave.localStorage'), 'pasteFromClipboard' and 'imageEdit'. Licence results are reported through onLicenseInvalid rather than this event.
You can apply it through the instance option license and check the result with the callbacks.
new WebEditor('#editor', {
license: 'WED2-XXXX-XXXX-...',
onLicenseValid: (info) => console.log('valid:', info.info.customer),
onLicenseInvalid: (state) => console.warn('error:', state.reason)
});
Global licence: instead of passing license on every page, set the key once globally.
// option 1) a static property
WebEditor.defaultLicense = 'WED2-XXXX-...';
// option 2) a global variable — declared once in a shared script loaded before the bundle (e.g. webeditor-configuration.js)
window.WebEditorLicense = 'WED2-XXXX-...';
options.license > license in the site settings file (dee-editor.config.js) > WebEditor.defaultLicense > window.WebEditorLicense. ECDSA signature and domain verification apply in exactly the same way in every case, so security is not weakened.'unlicensed'— no key, or none configured'invalid'— malformed key or signature mismatch'expired'— the licence has expired'mismatch'— the current domain is not in the licence's allowed list'domainKeyRequired'— the local-only key'dextsolution'was used on a real domain (a domain key is required)
192.168.x and so on) and internal TLDs (.local, .lan) are also excluded from the development-host list and require a key. (Development hosts are only localhost, 127.0.0.1, ::1, 0.0.0.0, and file:.)Local development (without a watermark): on a development host, enter the reserved local-only key 'dextsolution' instead of a full key. (It is not valid on real domains or private IPs.)
// development hosts only (localhost and friends)
new WebEditor('#editor', { license: 'dextsolution' });
// or globally
window.WebEditorLicense = 'dextsolution';
- No key: the editor runs in trial mode with a watermark everywhere, development hosts included. Please enter
'dextsolution'or a real key. - A real key still has its signature and expiry verified on localhost; only domain matching is waived, so you can confirm that the key works locally.
- Plain HTTP: since v2.6.7.0 a built-in verifier checks signature, domain and expiry over plain HTTP exactly as over HTTPS. If a key that worked over HTTP on an older version is now rejected, it was altered when it was copied. Please paste the original key again (HTTPS is recommended in production).
You can read info.info from the onLicenseValid callback, or editor._licenseState on the instance.
new WebEditor('#editor', {
license: 'WED2-...',
onLicenseValid: (info) => {
console.log(info.info);
// { valid:true, customer:'ACME-001', domains:['example.com','*.example.com'],
// type:'perm', expiry:0, mode:'ecdsa' }
}
});
// per-instance state
const state = editor._licenseState;
// real key (local): { evaluation:false, devHost:true }
// 'dextsolution': { evaluation:false, localLicense:true }
// no key: { evaluation:true, reason:'unlicensed' }
It disappears once you apply a full licence key. To disable it temporarily during development or testing:
new WebEditor('#editor', {
evaluationWatermark: false // hide the watermark (default: true)
});
evaluationWatermark: false in production violates the licence agreement. Please purchase and apply a full key.The browser console shows one line, [Dee Editor] license key rejected — <reason>. The key itself is never printed.
charset— a character that is not allowed in a key was included while copying, and its position is shown. Please copy the original key again as plain text (invisible characters, full-width characters and Word-style hyphens are filtered automatically).signature·truncated— the key was altered or cut short.mismatchinonLicenseInvalid— the current domain is not in the key's allowed list.
docs/license-check.html from the package, enter the key and the site address, and press [Check] to see signature, expiry, allowed domains and the verdict in a table (see also docs/license-troubleshooting-guide.html). A wrong key in the site settings file takes precedence over the key in page code, so please check that file as well.const editor = new WebEditor('#editor', {
autoSave: {
interval: 30000, // save interval in ms (default 30000)
storageKey: 'draft-post-1', // the localStorage key
unloadWarning: true, // warn before the user leaves the page
unloadMessage: 'You have unsaved changes.',
onSave: (html) => {
console.log('auto-saved:', new Date().toLocaleTimeString());
}
}
});
// recover the draft
const draft = editor.getAutoSaved();
if (draft && confirm('Recover the auto-saved draft?')) {
editor.setHTML(draft);
editor.clearAutoSaved(); // clear it once recovered
}
// save immediately, by hand
editor.saveNow();
To show a banner above the content and stop the submission itself, please use guardBeforeSubmit(). See Blocking a submission below.
const editor = new WebEditor('#editor', {
// banned words
profanity: {
words: ['badword1', 'badword2'],
maskChar: '*', // masking character (default '*')
onDetect: (matches) => {
console.log('banned words found:', matches);
}
},
// personal-data detection patterns
privacy: {
detect: ['ssn', 'phone', 'email', 'credit-card', 'bank-account'],
onDetect: (matches) => {
console.warn('personal data found:', matches);
}
}
});
// validate everything before saving
document.getElementById('submit-btn').onclick = async () => {
const result = await editor.validate();
if (result.profanity.length > 0) {
alert(`Found ${result.profanity.length} banned word(s).`);
return;
}
if (result.privacy.length > 0) {
if (!confirm('Personal data was found. Continue anyway?')) return;
}
// mask it, then save
const maskedHtml = editor.maskSensitiveData();
submitContent(maskedHtml);
};
guardBeforeSubmit() runs the check, shows a banner above the content, and blocks the
submission in one call. ok:false means “the host should stop submitting”.
const editor = new WebEditor('#editor', {
privacy: { detect: ['ssn', 'phone', 'email'] },
profanity: { words: ['badword'] },
guard: {
notify: 'banner', // 'banner' | 'notice' | 'both' | false
block: true, // a detection returns ok:false
mask: 'confirm', // offer [Review and mask] in the banner ('off' hides it)
},
});
submitBtn.onclick = async () => {
const r = await editor.guardBeforeSubmit();
if (!r.ok) return; // the editor has already shown the banner
submitContent(editor.getSafeHTML());
};
allowGuardItems(items) for the rest of this editing session
(getGuardAllowList() · clearGuardAllowList()).
Matching is based on the value, not the type, and the list is cleared when the page is reloaded.There are two ways the background is preserved. Small images (under 10KB) are embedded as base64
and are saved with the content, but the upload path (store:'meta', the default in upload mode)
is not part of getHTML().
// saving — keep the content and the background separately
const html = editor.getHTML();
const bg = editor.getDocumentBackground(); // { image, color, repeat, attachment, … } | null
save({ html, bg });
// loading — set the content, then put the background back
editor.setHTML(saved.html);
if (saved.bg) await editor.setDocumentBackground(saved.bg);
store:'wrapper' (the base64 default) getHTML()/setHTML()
preserve it automatically. Choose documentBackground.store based on whether payload size or
round-trip convenience matters more.Built in since v2.6.5, so there is nothing to register. [Edit image] appears in three places: on the toolbar right next to [Insert image] (command imageEdit), under Insert › Edit image… in the menu bar, and in the menu below a selected image (next to caption, link and alt text). The editor opens in a new window; when you save, the window closes and the image is replaced in place.
<script src="dist/webeditor.min.js"></script>
// 1) default — write nothing; the three buttons appear and it opens in a new window
new WebEditor('#editor', { uploadHandler });
// 2) turn it off
new WebEditor('#editor', { imageEditor: false });
dext-image/ folder. Placed beside dist/, it is found automatically and prefetched when an image is selected or the button is hovered (single-file bundle dext-image.bundle.min.js, 6 requests). Pages that never edit images download nothing extra.uploadHandler; if there is no handler, it is inserted as base64. It is an ES module, so a page opened as file:// cannot load it; a web server is required.WebEditor.registerPlugin('dextImage', createDextImagePlugin()) + plugins:['dextImage']) still works. When 'dextImage' is in plugins, the core button is hidden so that you never see two buttons. A working sample is available at demo/image-edit.html.The default is a separate window (mode: 'popup'): it does not cover the content,
so you can compare against the original, and the tools are not cut off on a narrow screen.
To open it inside the page, pass mode and target.
new WebEditor('#editor', {
imageEditor: {
mode: 'inline',
target: '#image-editor', // where the editor opens (required for inline)
actionBar: false, // drop it from the menu under the image, keep the toolbar button
editorOptions: { popupWidth: 1280, popupHeight: 900 }, // DEXT Image options
},
});
onPopupBlocked is called
(a notice dialog by default) rather than the button appearing to do nothing. The window is opened
straight from a button click, so ordinary settings do not block it.#icon-image-edit (a photo frame with a pencil) in the core sprite, distinct from the button that inserts an image. The bundled icon themes include icon-image-edit.svg, so it still shows with iconTheme; for a custom theme folder, please add a file with the same name.The DEXT Image that ships with Dee Editor is the 2.2 edition, so every tool works without a separate key (production domains included).
| Basic tools | Open, crop, resize, canvas, 90º rotate and flip, mosaic, fill, undo, zoom, export |
|---|---|
| 2.0 tools | Text, shapes and arrows, drawing and eraser, brush mosaic, colour adjust, filters, free-angle rotation, frames |
dext-image/ folder or a browser cache is still in use.
Please replace it with the distribution's dext-image/ and hard-refresh the page (Ctrl+F5). The badge at the bottom of the editor should read 2.0.// the default mini toolbar (Bold, Italic, Underline, Link, colors)
new WebEditor('#editor', {
inlineToolbar: true
});
When you select text by dragging, the mini toolbar appears above the selection. Touch devices are supported too.
// set the zoom level (0.25 – 4.0)
editor.setZoom(1.5); // 150%
editor.setZoom(0.75); // 75%
editor.setZoom(1.0); // 100% (original size)
// read the current ratio
const ratio = editor.getZoom(); // e.g. 1.5
// the zoom change event
editor.on('zoom', ({ ratio }) => {
console.log('zoom now:', Math.round(ratio * 100) + '%');
});
Printing and PDF saving both use the browser's print dialog. Toolbar [Print], File › Print, the ribbon and Ctrl+P all go through printDocument(), so the result is the same wherever you start (v2.6.5).
// print the body — choose "Save as PDF" in the dialog
editor.printDocument();
editor.printDocument({ title: 'APR-2026-0001' }); // title = default PDF file name (v2.6.6)
// print any HTML with the same styles
editor.printHTML(html, { title: 'Quote' });
// print preview — the same document as one sheet of paper in a new window (null if pop-ups are blocked)
editor.previewDocument({ title: 'Quote' });
// older APIs still work — print the editing view as it is
editor.saveToPDF({ title: 'Document title', hideToolbar: true });
editor.saveToPDFInWindow();
title becomes the print document's <title>; for hidden-iframe printing the host page title also changes while printing and is then restored. Without it, a default title for the UI language is used.@page), the document background, Excel/shape/imported-document rules and page breaks, and an Excel sheet wider than the paper is scaled to fit for both [Print] and [Save PDF]. For server-side PDF generation, you can extract the content with getHTML() and use Puppeteer, wkhtmltopdf or a similar tool.Load the extra plugin bundle and include 'wordimport' in the plugins option.
<!-- load the extra bundle -->
<script src="dist/plugins/wordimport-native.min.js"></script>
<script>
new WebEditor('#editor', {
plugins: ['format', 'image', 'table', 'link', 'emoji',
'video', 'sourceview', 'insert', 'find', 'wordimport']
});
</script>
Once enabled, use File → Import MS Word in the menu bar, or drag a .docx file onto the editor to convert it automatically.
// pass a File object directly
document.getElementById('file-input').addEventListener('change', async (e) => {
const file = e.target.files[0];
if (!file || !file.name.endsWith('.docx')) return;
try {
await editor.importWordFile(file);
console.log('Word import finished');
} catch (err) {
console.error('import failed:', err.message);
}
});
Converted:
- Headings (H1–H6), paragraphs, line breaks
- Bold, italic, underline, strikethrough, font colour, highlight
- Tables (including cell backgrounds, border colours, and column widths)
- Inline images (EMU → px, inserted as base64)
- Hyperlinks
Not converted:
- SmartArt, charts, OLE objects
- Complex multi-column layouts
- Macros and VBA scripts
.doc format is not supported. Please save the file as .docx before importing.Create an editor with no menu bar or toolbar in a new window, convert with importWordFile(), then lock it with setReadOnly(true) for a non-editable preview. This is the pattern the board uses for .docx attachments.
const ed = new WebEditor('#preview', {
menubar: false,
plugins: ['format','image','table','link','wordimport']
});
ed.showToolbar(false); // hide the toolbar icons
await ed.importWordFile(file, { silent: true, mode: 'replace' });
ed.setReadOnly(true); // blocks editing, the menu bar, context menus, and resizing
setReadOnly(true)) also blocks the menu bar, table and image context menus, and resizing. For the full implementation see Board attachments & document preview in the Extensions tab.Please load the separate plugin bundle and include 'hwpximport' in plugins. It is opt-in, so leaving it out changes nothing.
<!-- load the extra bundle -->
<script src="dist/plugins/hwpximport-native.min.js"></script>
<script>
new WebEditor('#editor', {
plugins: ['format', 'image', 'table', 'link', 'hwpximport']
});
</script>
Once enabled, use File → Import Hangul HWPX in the menu bar, the toolbar's Import document button (default importMode:'unified'; per-format icons with importMode:'individual'), or drag a .hwpx file onto the editor.
const file = e.target.files[0];
if (!file || !file.name.endsWith('.hwpx')) return;
await editor.importHwpxFile(file, {
mode: 'replace', // 'cursor' | 'append' | 'replace'
maxTableWidth: 740, // scale top-level tables to this px width (740–780 recommended)
silent: false // true skips the conversion dialog
});
Converted :
- Paragraphs, alignment, line spacing, bold / italic / underline, font colour, size, and family
- Tables (merged cells, borders, solid and gradient backgrounds, cell width / height, vertical alignment)
- Images (BinData → inline base64)
- Vector shapes (polygons, rectangles, and so on) → inline SVG
- Symbol-font characters (PUA) mapped to standard Unicode
- Dotted table-of-contents leaders and page breaks (pageBreak, plus an automatic break before a table of contents)
- Text inside shapes (hp:drawText)
- Equations (fractions, scripts, radicals, matrices as HTML), footnotes and endnotes, automatic paragraph numbering, multi-column layout (v2.6.7.0)
Not converted:
- Precise layout of SmartArt or complex drawing groups
- Headers and footers, text wrapping around shapes, shape rotation
.hwpx (OWPML) is handled by this plugin; binary .hwp is imported by the separate hwpimport plugin (v2.6.7.0); please see the items below. For unsupported elements, the text is kept and a warning is shown.It works exactly as with Word: convert the file with importHwpxFile() into an editor with no menu bar or toolbar, then lock it with setReadOnly(true).
const ed = new WebEditor('#preview', {
menubar: false,
plugins: ['format','image','table','link','hwpximport']
});
ed.showToolbar(false);
await ed.importHwpxFile(file, { silent: true, mode: 'replace', maxTableWidth: 740 });
ed.setReadOnly(true); // blocks editing, the menu bar, and context menus
Yes. Since v2.6.7.0, HWP 5.0.x – 5.1.x files (.hwp saved by Hangul 2002 – 2024) can be imported. Load the separate hwpimport plugin after the core bundle and add it to plugins (opt-in).
<script src="dist/webeditor.min.js"></script>
<script src="dist/plugins/hwpximport-native.min.js"></script>
<script src="dist/plugins/hwpimport-native.min.js"></script>
<script>
const editor = new WebEditor('#editor', { plugins: ['hwpximport', 'hwpimport'] });
// The unified button and drag-and-drop work automatically. In code:
editor.importDocumentFile(file); // picks the module from the extension
editor.importHwpFile(file, { silent: true, mode: 'replace' });
</script>
It imports character and paragraph formatting, tables (merges, per-side borders, fills, nested tables, table captions), pictures (JPG, PNG, GIF, BMP — including stamps and signatures placed behind or in front of text), grouped shapes and title boxes, equations (fractions, scripts, radicals, brackets and matrices rendered as HTML), page breaks, and footnotes. Both compressed and uncompressed files work.
The formats differ: .hwpx is ZIP + XML, while .hwp is an OLE compound document with compressed records. So hwpximport and hwpimport have separate engines and separate bundles, and you may load just one of them.
There is still only one button. The unified “Import document” button, drag-and-drop, and importDocumentFile(file) route files by extension: .hwp files go to hwpimport, and .hwpx files go to hwpximport. The file picker offers .hwp only when hwpimport is loaded.
- HWP 3.0 or earlier (Hangul 97, 3.x and before) — the structure is entirely different, so it cannot be imported. The user is asked to open it in Hangul and save it again (.hwp or .hwpx), or to copy and paste the content. Pasting works for 3.0 documents too.
- Password-protected documents — the import stops with a “password-protected documents cannot be opened” message. Please remove the password in Hangul, save the file again, and try once more.
- Distribution (read-only) documents — the body is encrypted, so only the document's preview text is inserted, with a notice saying so.
- An HWPX file merely named .hwp — a message asks you to “rename the extension to .hwpx”.
- HWP 6 and later, or other versions — the import stops with “unsupported HWP version” (the version number is shown).
Yes. Load the pdfimport plugin (opt-in · dist/plugins/pdfimport-native.min.js) after the core bundle and add it to plugins. The unified "Import document" button, drag & drop and importDocumentFile(file) send .pdf files to it.
<script src="dist/webeditor.min.js"></script>
<script src="dist/plugins/pdfimport-native.min.js"></script>
<script>
const editor = new WebEditor('#editor', { plugins: ['format', 'image', 'table', 'pdfimport'] });
await editor.importPdfFile(file, { importMode: 'auto', pageBreaks: false });
</script>
A PDF has no paragraphs, only coordinates. The text fragments are rebuilt into lines → paragraphs, headings, lists, tables (ruled grids, merged cells) and pictures; two-column text is read column by column, and running headers, footers and page numbers are removed. Scanned pages with no text come in as pictures. Documents with an open or permissions password can be opened too (the password is asked for when needed).
mode ('cursor'/'append'/'replace') · silent · pages (page numbers) · importMode ('auto'/'text'/'image') · pageBreaks · headerFooter · password · engine. The file is never sent to a server, so it works on closed networks. PDF import is a Beta feature (manual 9-J).- Type 1 (
engine:'native') — Dee Editor's own parser. It needs no external library and is always available. - Type 2 (
engine:'dext-pdf') — uses the structure analysis of the DEXT-PDF runtime (dext-pdf/). DEXT-PDF works out paragraphs, headings, lists and tables, and it adds highlighted / underlined / struck-through text, importing every page as a picture, and falling back to a page picture where the text cannot be read.
The default 'auto' picks Type 2 when the runtime is present and Type 1 otherwise. You can switch between them under "Conversion engine" in the import dialog. To fix one engine for the whole site, set it in a global script loaded before the bundle (it is not a key of the site settings file dee-editor.config.js).
// a global script loaded before the bundle (e.g. webeditor-configuration.js)
window.WebEditorPdfImportEngine = 'both'; // 'type1' built-in only · 'type2' DEXT-PDF only · 'both' (default)
// per call / per editor
editor.importPdfFile(file, { engine: 'dext-pdf' });
new WebEditor('#editor', { plugins: ['pdfimport'], pdfImport: { engine: 'auto', dextPdfUrl: '/dext-pdf/dext-pdf.js' } });
engine passed to importPdfFile > the editor option pdfImport.engine > the global setting. The runtime is loaded on first use and is not part of the Dee bundle.The grid formed by the lines comes in as a table — merged cells, column widths, shaded cells and right-aligned amounts. With Type 2, when DEXT-PDF's structure analysis does not return a page as a table, only that page is rebuilt by Dee from DEXT-PDF's text fragments and ruled lines (other pages keep the structure analysis as it is).
- Small boxes standing on their own inside a large cell (the boxes in a form header) become nested tables inside the parent cell, laid out side by side as box · title · box, so the title and the boxes' text do not run together.
- Cell borders are not read as blanks. Only a free-standing underline such as "Contact: ____" is a blank; a horizontal line whose end touches a vertical line is a cell border.
Please import it with Type 2 (DEXT-PDF 0.4.8 or later), which handles both issues.
- A background picture (a certificate's seal watermark, letterhead wash, a scan with recognised text) is excluded from the content and reported as a removed background image. DEXT-PDF decides this based on whether the page's text is set on top of it. Size alone cannot distinguish it from a real figure, so with Type 1 it is imported as a picture.
- "Label : value" lines get a line each. Fragments that contain only
':'are removed, and where only part of a page is set in two columns, the right-hand column is placed right after the left-hand item beside it.
dext-pdf/ folder with 0.4.8 or later. No option or code change is needed.- Fonts without a character map (ToUnicode) — text in legacy CID fonts or Type3 fonts cannot be read. Garbled text is never inserted; the page is skipped with a warning or inserted as a page picture (Type 2). The same reason explains a few missing symbols in an otherwise readable form.
- Scanned documents have no text, so they come in as page pictures. With
importMode:'text'the content is left unchanged and a notice explains why; you can use OCR to extract the text. - If a warning says text on top of a filled box was lost, switch the conversion engine to "PDF Type 1" in the dialog and import again.
- With Type 2, vector shapes and charts are captured from the page as pictures; with Type 1, they are not imported. Type 1 cannot import JPX, JBIG2 or CCITT pictures.
showLog:true shows every conversion warning).You can switch the menu UI between classic and ribbon, and apply an icon theme across both the toolbar and the ribbon.
new WebEditor('#editor', {
uiTemplate: 'ribbon', // 'classic' | 'ribbon'
iconTheme: 'blue', // default · gray · blue · colorful · vivid · natural · emoji, or a folder name
iconThemePath: 'assets/icon-themes'
});
// switch at runtime
editor.setUITemplate('classic');
editor.setIconTheme('vivid'); // updates the toolbar and ribbon tabs together
iconTheme:'blue' and friends) load icons as external SVGs, so please make sure to deploy the assets/icon-themes/<theme>/ folder alongside them. The default theme is bundled.The paste button in the menu and ribbon uses the async Clipboard API (pasteFromClipboard()). It requires a secure context (HTTPS or localhost), a user gesture, and clipboard permission.
const ok = await editor.pasteFromClipboard();
if (!ok) console.warn('clipboard unavailable — use Ctrl+V');
false and falls back to the Ctrl+V hint. Because of browser policy, pasting cannot be forced from code.Load the Markdown extension pack (opt-in) and add 'markdown' to plugins for round-trip conversion between Markdown and the body.
<script src="dist/plugins/markdown-native.min.js"></script>
const editor = new WebEditor('#editor', {
plugins: ['format','image','table','link','markdown']
});
await editor.importMarkdownFile(file, { mode: 'replace' }); // .md file → body
editor.setMarkdown('# Title\n\n**bold**', { mode: 'replace' }); // string → body
const md = editor.getMarkdown(); // body → Markdown
const { html } = editor.viewMarkdown(md); // Markdown → sanitized HTML
.md file in. <script> and javascript: links are blocked automatically. If you do not load the extension pack, the core is unaffected.The toolbar image button now offers file upload plus URL entry in one dialog. From code, use insertImage().
editor.insertImage('https://example.com/photo.png', 'Alternative text');
javascript:, vbscript:, and non-image data: schemes are blocked automatically.The settings hub lets you lay out toolbar icons (visibility, order, placement across rows 1–3, separators), the menu bar structure, width, and status bar, then save it as a config file. The saved config has the same shape as the editor options.
new WebEditor('#editor', {
menubar: savedConfig.menubar, // menu bar structure
toolbar: savedConfig.toolbar, // toolbar icon layout
statusbar: savedConfig.statusbar,
width: savedConfig.width
});
When you load the shared module doc-tools.js and call DeeDocTools.attach(editor), File ▸ Template (12 forms) and File ▸ Layout (16 table structures) appear in the menu.
<script src="doc-tools.js"></script>
DeeDocTools.attach(editor);
templates/ folder; on static hosting, please refresh the list with make-templates-manifest.js.The demo board stores attachments in localStorage as data URLs, and imports attached .docx, .hwpx, and .md files into a new editor window with no menu bar or toolbar for preview.
// preview window: an editor with no menu bar or toolbar
const ed = new WebEditor('#pv', {
menubar: false,
plugins: ['format','image','table','link','wordimport','hwpximport','markdown']
});
ed.showToolbar(false); // hide the toolbar icons
ed.setHeight(window.innerHeight - 46); // fixed height + internal scrolling
// restore the File from the data URL, then import by format
if (/\.hwpx$/i.test(name)) ed.importHwpxFile(file, { silent:true, mode:'replace' });
else if (/\.(md|markdown)$/i.test(name)) ed.importMarkdownFile(file, { mode:'replace' });
else ed.importWordFile(file, { silent:true, mode:'replace' });
localStorage with a file upload API. For the pattern, see 14-3 “Board attachments & document preview” in the developer manual. For a server-side example, see the sample JSP board.The mobile demo (demo/mobile.html) offers one row of core icons plus a “more” (⋯) bottom sheet, and the shared top menu becomes a hamburger dropdown below 900px.
toolbarResponsive option.Load the opt-in bundles and add 'xlsximport' and 'pptimport' to plugins. Excel converts sheets into tables, and PowerPoint converts slides into body content, in order.
<script src="dist/plugins/xlsximport-native.min.js"></script>
<script src="dist/plugins/pptimport-native.min.js"></script>
const editor = new WebEditor('#editor', {
plugins: ['format','image','table','link','xlsximport','pptimport']
});
editor.importXlsxFile(file, { mode:'replace', maxTableWidth: 740 });
editor.importPptxFile(file, { mode:'replace' });
=TODAY() recalculation and multiple sheets; PowerPoint import preserves text boxes, fonts, colours, tables, and images. It all runs on the browser's built-in DecompressionStream, with no external libraries.The importMode option chooses between a single unified button (the default) and one button per format. The unified button reads the file extension and routes to the right engine.
new WebEditor('#editor', {
importMode: 'unified', // 'unified' (default) | 'individual'
plugins: ['format','image','table','link',
'wordimport','hwpximport','xlsximport','pptimport']
});
// calling it from code also routes by extension
editor.importDocumentFile(file, { mode: 'replace' });
'individual' shows a separate icon per format, while 'unified' shows a single Import document icon. Putting 'importDocument' or commands such as 'wordImport' and 'hwpxImport' directly in the toolbar array places those buttons regardless of importMode. The menu bar is set separately with menubarImportMode (default 'individual').With fixedHeight on, the editor does not grow as the content gets longer; a vertical scrollbar appears inside the editing area instead. We recommend it where the page layout needs to stay fixed.
new WebEditor('#editor', {
height: 500,
fixedHeight: true // default false (the editor grows with content)
});
editor.setFixedHeight(false); // switch at runtime
fixedHeight:false (the default) behaves exactly as before, so upgrading changes nothing.With toolbarOverflow on (the default is true), icons that exceed the toolbar width do not wrap to the next line; instead, they fold into a » (more) popup on the right. To wrap as before, set it to false.
new WebEditor('#editor', {
toolbarOverflow: true // true (default) = fold into » / false = wrap
});
'|') shows as much as fits and folds only the overflow. To use an entirely different toolbar array per width breakpoint, combine it with toolbarResponsive. You can try it in the narrow-width preview at the bottom of the icon & toolbar UI settings page.Yes. Click the image to select it, press Ctrl+C (copy) or Ctrl+X (cut), then Ctrl+V where you want it. The resized dimensions (width and height) are preserved.
'image') to be loaded. An image pasted into a table cell is scaled automatically so it does not exceed the cell width.Yes. Pasting no longer goes through execCommand('insertHTML'), which re-serialises and re-parses an HTML string. It now inserts the parsed nodes directly at the caret, which is noticeably faster on large documents.
Shapes are a built-in core plugin ('shape') and work in the default setup. Open the palette from the toolbar [Insert shape], Insert menu [Shape] or the ribbon's Insert tab. If you list plugins yourself, please include 'shape'.
new WebEditor('#editor', {
plugins: ['format','image','table','link','shape']
});
'insertShape' so that the button appears.Both are fixed. Please replace dist with the latest build and hard-refresh the page (Ctrl+F5).
- Doubled table borders — the editing-mode table guides (
showTableGuide) were drawn over cells that already had borders. Guides now appear only on borderless cells. - Images overflowing cells — an image inserted into a table cell could exceed the cell width. Images inside cells are now sized to the cell.
dist/webeditor.js (or .min.js) and dist/webeditor.css with the new versions.You only need one option: language. Korean (ko) and English (en) are built into the core, so no extra file has to be loaded.
const editor = new WebEditor('#editor', { language: 'en' });
It covers the entire UI — menu bar, ribbon, toolbar tooltips, every plugin dialog (table, shape, image, link, find, video, emoji, document background, forbidden-word check), and the import dialogs (Word, HWPX, XLSX, PPTX, Markdown).
No. Without an explicit language, it is fixed to 'ko' and renders exactly as previous versions did.
To follow the browser or OS language, please set 'auto' explicitly.
new WebEditor('#editor'); // ko (unchanged)
new WebEditor('#editor', { language: 'auto' }); // detect: <html lang> → navigator.language
setLanguage(lang) switches immediately. The body content, caret position, modified flag, and read-only state are all preserved, so it is safe to press mid-edit.
editor.setLanguage('en');
editor.getLanguage(); // 'en'
// detect when the switch finishes
editor.on('languagechange', (lang) => {
console.log('switched:', lang);
});
You can add it with WebEditor.registerLocale(); no core changes are required. A locale pack is a flat 'namespace.key' → string map.
// building a language that has no pack yet (French, say)
WebEditor.registerLocale('fr', {
'menu.file': 'Fichier',
'menu.edit': 'Édition',
'core.placeholder': 'Saisissez votre contenu.',
});
new WebEditor('#editor', { language: 'fr' });
// Japanese needs no work — a complete 830-key pack is included
<script src="dist/webeditor.min.js"></script>
<script src="dist/locales/ja.min.js"></script>
new WebEditor('#editor', { language: 'ja' });
With merge: true, only the keys you list are overwritten in the existing pack.
WebEditor.registerLocale('en', {
'menu.file': 'Document',
'core.placeholder': 'Enter the notice text.',
}, { merge: true });
merge: true replaces the whole pack, so every string you did not list falls back. Please always set it when you change only part of a pack.You can find the key names in the Japanese pack dist/locales/ja.js (unminified, covering both core and import-pack keys). There are currently 830 keys each for ko, en and ja.
The import pack's strings (imp.*) live in the extension bundle rather than the core dictionary and merge into the core dictionary when the script loads. This way, projects that do not use the extension packs do not have to load the extra size.
To override an imp.* string, please call it after the extension script has loaded.
<script src="dist/webeditor.min.js"></script>
<script src="dist/plugins/wordimport-native.min.js"></script>
<script>
// ↑ the merge only survives if this runs after the extension pack loads
WebEditor.registerLocale('en', { 'imp.ok': 'Import' }, { merge: true });
</script>
Everything is included in dist/webeditor.d.ts.
import WebEditor, { WebEditorLanguage, WebEditorLocalePack } from './dist/webeditor';
const ed = new WebEditor('#editor', { language: 'en' });
ed.setLanguage('ko'); // → this (chainable)
ed.on('languagechange', (lang) => { /* lang: string */ });
const pack: WebEditorLocalePack = { 'menu.file': 'Fichier' };
WebEditor.registerLocale('fr', pack); // → boolean
The whole UI is translated. The following are out of scope by design.
- Body content — anything the user typed or imported
- Date/time insertion formats — the format list currently follows Korean conventions (no per-language default format)
- The trial modal — it follows the separate
licenseLangoption - Demo and manual pages — the documentation pages themselves
[some.key] on screen means that key is missing from the locale pack. You can fill it in with registerLocale().Yes. Objects floating over a sheet used to be omitted entirely, with no warning; they are now converted into the document. This is the default behaviour, and no configuration is needed.
- Pictures — inserted as base64
<img>elements at their display size, scaled down proportionally when they exceedmaxTableWidth. - Shapes — text inside a shape is preserved as a paragraph.
- SmartArt — the laid-out result is imported as an approximate SVG, with its shapes, coordinates, rotation and theme colours.
- Charts — pie, doughnut, bar, line and area are drawn as SVG, including the chart title, axis titles, value-axis ticks and horizontal gridlines.
They are not omitted silently. Instead, they are counted by kind and reported as warnings, so you can see what was left out right after importing.
Not supported:
- Scatter, bubble, radar, stock, combo and 3D charts
- Secondary axes, logarithmic scales
- Form controls such as list boxes and buttons — checkboxes and option buttons are imported as ☑/☐ and ◉/○ characters since v2.6.5.1 (checked state kept)
Area charts are approximated as lines.
Set images: false to turn drawing-object conversion off entirely.
editor.importXlsxFile(file, { silent: true, images: false });
That is intentional. Previously a single-sheet workbook skipped the dialog and was inserted straight away, which left no chance to choose the insert mode, so a document being edited could be replaced unexpectedly. The dialog now appears regardless of sheet count.
The default insert mode also changed from replace to cursor. Word, PPTX and HWPX already defaulted to cursor; only XLSX differed.
// Import without the dialog
editor.importXlsxFile(file, { silent: true, mode: 'cursor' });
// Show the dialog but preselect a different mode
editor.importXlsxFile(file, { defaultMode: 'replace' });
This has been fixed. The previous implementation took the selection as plain text and replaced it wholesale, so italics, bold, hyperlinks and text colour inside it were all lost.
Now only the characters in the text nodes are changed, so formatting and element structure are preserved. The selection is also kept, and undo works as expected.
This is a mobile-browser limitation. Android Chrome does not render a PDF placed in an <iframe> or <object>, and iOS Safari draws an inline PDF one page only. This is browser behaviour and cannot be worked around without an external PDF library.
Instead of showing a blank frame, the demo board explains why and offers Download to view as the primary button. On both platforms the downloaded PDF opens correctly, with all pages, in the device viewer.
navigator.maxTouchPoints has to be checked as well to detect a tablet.This has been fixed in the demo board (write and view). A long file name is now truncated with an ellipsis while keeping the extension, and the buttons are fixed in size so they never shrink.
min-width: auto default on flex items: they do not shrink below their content, so the container grows instead. We recommend applying min-width: 0 to the container in your own screens as well.Yes. You can load a host HTML page into a WebBrowser component, and two-way communication works as follows.
- Nexacro → editor:
WebBrowser.callMethod('fnName', args…)— this returns synchronously (the same origin is required). - Editor → Nexacro:
window.NEXACROWEBBROWSER.postUserNotify(...)→info.userdataon theonusernotifyevent.
NEXACROWEBBROWSER is injected at the iframe's load event, so it may arrive after your document is already ready. A ready signal that is fired once and discarded will be missed, so please keep a flag or poll for it. Also note that NEXACROHTML does not exist in V24.Business report · internal draft · notice · official letter · meeting minutes · business trip request · leave request · expense claim · expenditure resolution · purchase request · vehicle dispatch request · resume — twelve in total.
A notice form for internal board announcements was added (an audience/period/place/method table, key points, cautions and a contact). It is separate from the existing official letter, which is meant for outbound correspondence.
demo/templates/. On static hosting with directory listing disabled, please refresh templates.json with node make-templates-manifest.js.There are three, by target environment. Each includes Dee Editor, DEXT Image and the DEXT-PDF runtime, plus the board's Java source (source/) and rebuild scripts (build-classes.bat · .sh).
- Windows
dee-board-v<version>.zip— Java 8 JRE, embedded Tomcat 9, H2. Start it withrun.bat. - Ubuntu
dee-board-v<version>-ubuntu.tar.gz— the same stack. Start it withrun.sh. - Linux
dee-board-v<version>-linux.tar.gz— for CentOS with an installed Tomcat 7 and Oracle. Install withboard.sh.
uninstall.bat (Windows) and uninstall.sh (Ubuntu) stop the server and delete the folder, asking whether to keep data/ (posts and attachments). On Linux, ./board.sh uninstall removes it from Tomcat and keeps data and the database. Server messages follow the screen language (Korean or English).The server enforces the limits — 10 attachments per post, 100 MB per file, 200 MB per upload. Splitting an upload or adding files while editing does not get around them. If a limit is exceeded, nothing is saved and the limit is displayed.
# webapp/WEB-INF/classes/board.properties (bytes) — restart the board after editing
board.maxFileCount=10
board.maxFileSize=104857600
board.maxTotalSize=209715200
- SVG attachments are never shown inline; they are always downloaded, so scripts inside cannot run.
- A password-protected PDF opened with its password in the board's PDF window can be edited and saved with [Download as edited]; the result keeps the same password.
If there is no button, one of the following applies:
- It was turned off with
imageEditor: false. - Your custom
toolbararray does not include'imageEdit'. Please add it by command name (the UI settings page uses the same name). pluginsstill lists the old add-on name'dextImage'; in that case, the core button is hidden and only the add-on button is shown (this is expected).
If it does not open the first time: this was fixed in v2.6.5.1. A pop-up may only open within the click's user gesture, and on slow networks downloading the editor (130+ requests) took longer than that. The editor is now prefetched when an image is selected or the button is hovered and ships as a single-file bundle (dext-image.bundle.min.js, 6 requests). Please update dist and dext-image/ together.
Please leave it where the distribution unpacks it. With dist/ and dext-image/ side by side, the editor looks for ../dext-image/ and then ../dext-image-2.0.0/, relative to the bundle.
your-site/
├── dist/webeditor.min.js ← starts here
└── dext-image/ ← finds ../dext-image/
├── dext-image.bundle.min.js · dext-image.config.js
└── src/ vendor/ addons/ icon-themes/
// somewhere else — end the path with /
new WebEditor('#editor', { imageEditor: { path: '/static/dext-image/' } });
WebEditor.imageEditorPath = '/static/dext-image/'; // once for the whole page
file://. The distribution's demo launcher starts a small web server on this PC only.dext-image/icon-themes/) are found the same way, so iconThemePath is not needed. The toolbar uses icon buttons by default; for text buttons, please set imageEditor.editorOptions.toolbarLabels: 'text'.// off — no buttons or menu items, and the editor is never loaded
new WebEditor('#editor', { imageEditor: false });
// edited images go through the editor's uploadHandler (server if present, otherwise base64)
new WebEditor('#editor', {
uploadHandler: async (file, headers) => { /* upload, then return the URL */ },
imageEditor: { onNoUploadHandler: () => console.warn('inserting as base64') },
});
This was fixed in v2.6.5.x. Previously, three places (toolbar, menu bar, preview) each built their own print document, so their rules gradually diverged.
- Preview had its own document, which added a grey grid and enlarged cells. It now uses the same document as printing (
previewDocument()) and only draws a sheet of paper around it. Ctrl+P in that window gives the same result. - Stamps and signatures were hidden under the next cell's background. Floating pictures now get a
z-index, so editing, viewer, print and preview match. - Excel table margin and overflow rules in the print document now match the editing view, so lines no longer wrap differently only when printed.
editor.printDocument().This was fixed in v2.6.6.0. The print document does not load the editing view's editor.css; it has its own rules, and the rule for breaks inserted with Edit › Page break was missing there. That is why a break visible while editing silently disappeared in print.
dist is enough; no code change is needed. Page breaks from imported HWPX and the handling of "a page that runs slightly over splitting into two" have been in the print document since v2.6.5.0.Excel sheets keep their original column widths (px), so an 800px sheet looks fine while editing, but the A4 print width is 703px.
- [Print] — since v2.6.5.1 a sheet wider than the paper is scaled to fit. Width is measured to the right edge including floating stamps, and printing waits (up to 3 s) for images and fonts to settle.
- [Save PDF] — this path prints the editing view as it is and was still cut off before v2.6.6.0. It now fits the paper width just before printing and restores the screen afterwards.
importXlsxFile(file, { maxTableWidth: 703 }) (the same width in the editing view).Issues found with real-world forms (orders, applications, quotes) were fixed in v2.6.5.0 – v2.6.6.0.
- Checkboxes and option buttons (form controls) were skipped as pictures. They now come in as
☑/☐and◉/○characters, so they print, copy and search, and you can change the check by editing the character. =TODAY()·=NOW()— the file holds the value from the last save. They are now recalculated for today, and cells that add days (=QuoteDate+30) follow. Other formulas keep their saved results.- Fonts — name, size, italic and underline are read, not just weight and colour. Column widths use the document's default font, so columns in Korean documents are no longer too narrow.
- Long text wraps instead of being cut with
…; the wrap-text format and Alt+Enter are kept. - Decimals are rounded per format: 9447784.5 with
#,##0becomes9,447,785.
#REF!·#N/A·#DIV/0!(v2.6.5.0) — remnants of broken formulas, not content, so they come in as empty cells with a notice. A literal#REF!typed as text is kept.- Numbers that do not fit the cell (v2.6.6.0) — Excel hides them as
#, so a=F24(→₩0) in a one-character spacer column was invisible in Excel but appeared after import. Following Excel's rule (text spills into empty neighbours, numbers never do), the value is now cleared and logged as a warning. - Text stacking one character per line (v2.6.6.0) — the cell now stays as it is and only the text overflows (
nowrap+overflow:visible), so neighbouring borders stay in place.
change only says "the document changed", so every field had to be re-read on each keystroke, and your own writes fired change again. watch() (v2.6.6) takes a selector and passes only what changed.
// typing, paste, execCommand, DOM API writes and undo restores — one channel
const stop = editor.watch('[data-field]', (changed, info) => {
// changed : the changed elements (APIModel array, no duplicates, document order)
// info : { reason: 'input' | 'api' | 'restore', all: boolean } — all:true = whole body replaced
const total = changed.reduce(/* … */);
editor.silently(() => { // not observed inside — no feedback loop
editor.getAPIModelById('cell-sum', { skipRendering: true }).setText(total);
editor.render(); // the outer change still fires once (autosave needs it)
});
}, { debounce: 150 });
stop(); // unwatch
// one element — sugar for watch (needs an id)
const off = editor.getAPIModelById('cell-qty').on('change', (m, info) => { /* … */ });
watch and change are separate channels: skipRendering suppresses only change. During IME composition, changes are batched until composition ends. destroy() disconnects the observer. For a sample, see demo/dom-api.html panel 4 and manual §7.insertRow() only makes empty cells. duplicate() (v2.6.6) clones any element — a row, paragraph, signature block or <li> — places the copy beside it and returns the new model.
const rows = editor.querySelectorAll('tr[data-row="items"]');
const n = rows.length + 1;
const row = rows[rows.length - 1].duplicate({
ids: (old) => old.replace(/^(item-)\d+/, '$1' + n), // 'item-1-qty' → 'item-4-qty' · default 'strip' (remove ids) · 'keep'
empty: '[data-field]', // clear values only (attributes stay) · true = every leaf element
where: 'after', // 'before' · 'end' (end of the same parent)
}); // one change
ids: 'strip' because duplicate ids are invalid HTML and getAPIModelById returns only the first. Emptied table cells get so they keep their height and accept the caret.This is an opt-in extension (about 23 KB) built on the DOM API above (watch · silently · duplicate). Using markers on form cells, it extracts values, fills formula cells (only formulas that depend on changed cells), validates before submission, and adds and removes rows.
<script src="dist/webeditor.min.js"></script>
<script src="dist/plugins/approvalform.min.js"></script>
const editor = new WebEditor('#editor', {
plugins: ['format', 'table', 'approvalform'],
approvalForm: { debounce: 150, holidays: ['2026-10-03', '2026-10-09'] },
});
editor.loadApprovalForm(formHtml);
editor.on('approvalform:change', ({ fields, changed }) => { /* … */ });
const r = editor.validateApprovalForm(); // { ok, errors:[{ id, field, reason, message }] }
if (r.ok) save({ html: editor.getSafeHTML(), fields: editor.getApprovalFields() });
editor.addApprovalRow('items');
editor.removeApprovalRow('items'); // the last row is kept
// viewer — no recalculation (values are fixed at submission)
editor.setReadOnly(true).loadApprovalForm(doc.html, { readOnly: true });
eval; a built-in parser supports arithmetic, comparison, logic and SUM COUNT MIN MAX ABS ROUND IF DAYS WORKDAYS. Storage is a { html, fields } pair, and reporting reads fields only. See the demo demo/approvalform.html and manual §9-H. To build forms without code, see the form designer in the v2.6.8 tab.demo/approval/index.html is a sample built on approvalform that runs without a server, on localStorage. You can press [Fill sample document] to see it straight away.
- 13 built-in forms plus forms made in the form designer, and sequential approval-line editing — the signature boxes in the body follow the approval line
- Submit → approve/reject → resubmit, signature stamps, and the rejection reason shown in the banner, body (including print/PDF), list and edit screen
- Read-only view and isolated printing (
printDocument({ title: documentNo })— the document number becomes the PDF file name) - Per-user boxes: drafted, to approve, rejected, completed
- Admin reports — expenses by account (spent/planned, budget, remaining, rate) and leave (granted − approved = remaining)
Use the one-line setup added in v2.6.8. Load only the core bundle and call WebEditor.create with preset: 'full': it loads the document import, Markdown, OCR and chart plugins from the plugins/ folder next to the core, then returns an editor with the menu bar turned on.
const editor = await WebEditor.create('#editor', { preset: 'full' });
// leave some out
WebEditor.create('#editor', { preset: { name: 'full', exclude: ['pdfimport', 'ocr'] } });
<script> tags and plugins by hand still works as before.Load the site settings file dee-editor.config.js before the editor bundle. Each editor reads it automatically and uses it as the site-wide default, with no change to page code.
<script src="/dee-editor/dee-editor.config.js"></script>
<script src="/dee-editor/dist/webeditor.min.js"></script>
The file is produced with the admin settings tool (dee-admin-tool/ in the package). An administrator opens it locally as a file on their PC; no server or login is needed. You can check the result in the preview editor and then download it; the export step validates the file and shows its SHA-256 fingerprint.
sanitizeOnLoad, plugins, uploadHandler and similar) are ignored in the settings file. Developers should set those in page code.license) in the settings file takes precedence over global keys in page code (WebEditor.defaultLicense, window.WebEditorLicense). A wrong key, or the localhost-only key 'dextsolution', turns the whole site into a trial (watermark). If page code already sets a key, please leave the settings-file key empty; the admin settings tool warns about this on export.See it working in the site settings file sample.
From v2.6.8 there are three ways, and all of them build the same editor. Each has a minimal sample page.
- 1. Classic — load the core and plugin
<script>tags yourself and callnew WebEditor('#editor', { ... }). This is best when you want to decide exactly what is loaded. View sample - 2. One line — load only the core and call
WebEditor.create('#editor', { preset: 'full' }); it loads the extensions it needs. View sample - 3. Settings file — load
dee-editor.config.jsbefore the bundle and keep site-wide defaults in one file, so administrators can change them without code. View sample
demo/en/setup-guide/, with guides SETUP_1_CLASSIC.md, SETUP_2_ONE_LINE.md and SETUP_3_CONFIG_FILE.md.Use imageStorage.storeUrl and sameOrigin, added in v2.6.8. Keep the URL your server returns as-is ('asis'), and turn full URLs of this site (from paste, Insert URL or server responses) into relative paths ('relative').
new WebEditor('#editor', {
imageStorage: { storeUrl: 'asis', sameOrigin: 'relative' }
});
storeUrl is not set and urlBase is, images are stored with absolute URLs as before (compatible). To make only downloaded HTML absolute, add export: 'absolute'.Yes. Set autoSave.storage to 'indexedDB' and drafts are kept in IndexedDB, so large posts with images are not stopped by the localStorage quota (about 5 MB).
new WebEditor('#editor', {
autoSave: { storage: 'indexedDB' }
});
// read the saved draft asynchronously
const saved = await editor.getAutoSavedAsync();
getAutoSaveBackend().Set menubarImportMode: 'both'. The default 'individual' shows only per-format items, and 'unified' shows only the unified item.
new WebEditor('#editor', { menubarImportMode: 'both' });
You can turn on the A4 print-width guide (pageGuide). A vertical line marks the A4 text width (186 mm). When content crosses it, the line turns orange and the status bar lists the lines, tables and images that overflow. The line is drawn on screen only, so it never appears in saved HTML or printouts.
new WebEditor('#editor', { pageGuide: true });
// make on-screen wrapping match print
new WebEditor('#editor', { pageGuide: { mode: 'fit' } });
setPageGuide().new WebEditor('#editor', {
imageUpload: {
allowTypes: ['jpg', 'png', 'gif', 'webp'],
maxFileSize: 10 * 1024 * 1024, // 10 MB per file
maxCount: 10 // 10 images at a time
},
dragDrop: { document: false } // false blocks all drops
});
The limits apply to the image dialog, drag-and-drop and paste alike. Rejected files are not inserted and the user is told why (imageRejected event).
You can use table and cell locking. Add the data-we-lock attribute to your form HTML, or lock tables from code with setTableLock().
<table data-we-lock="size"> <!-- fix cell size and structure -->
<tr><td data-we-lock="readonly">Document No.</td><td></td></tr>
</table>
tableLock: { menu: true } adds a [Table lock] item to the context menu.From v2.6.8, load-time HTML sanitising (sanitizeOnLoad) is on by default. When saved content is loaded back, script, iframe, object, on* attributes and javascript: URLs are removed so that malicious code cannot run on the edit screen.
// only on screens that load HTML already sanitised by your server
new WebEditor('#editor', { sanitizeOnLoad: false });
From v2.6.8 the menubar option defaults to true. To hide it as before, please set the option as follows.
new WebEditor('#editor', { menubar: false });
toolbar: false or an empty array keep the menu bar off. For other changes, see the compatibility notes in the upgrade guide and release notes.There are three compatibility notes.
- Menu bar on by default — set
menubar: falseto hide it. - Load-time HTML sanitising (
sanitizeOnLoad, defaulttrue) — iframes, scripts andon*attributes are removed from loaded content. - Printing follows the editor's default formatting — unformatted text now prints and saves to PDF at the on-screen 10pt / 1.2 instead of the old 14px / 1.6 line height. To get closer to the old size, you can raise the defaults.
new WebEditor('#editor', { defaultFontSize: 11, defaultLineHeight: '1.6' });
07_Upgrade/UPGRADE_v2.6.7.2_to_v2.6.8.0.md in the package documents.Yes. The OCR extension ocr works with the DEXT-OCR engine. Use Text recognition on the toolbar or File menu, Extract text from image on an image's context menu, or import an image file or scanned PDF pages. Results are inserted at the cursor, page by page.
dext-ocr/) is not found, the OCR menu items stay hidden. If you placed it elsewhere, please specify its location with ocr: { dextOcrUrl: '...' }.Use the form designer (approvaldesigner extension). Draw the form in the editor and attach a field to each cell (key, type, required, options, range, formula). It supports repeating rows, form checks with auto-fix and preview, and you can start from a Hangul or Word document or a sample.
demo/approval/), which also includes 13 built-in forms and a beginner's form-writing guide.Load the chart plugin (chart) and charts appear on the 📊 toolbar button, the menu bar [Insert ▸ Chart…] and the ribbon [Insert] tab. Type values into the dialog grid or paste a range from Excel to insert column, bar, stacked bar, line, area, pie and doughnut charts. You can also right-click a table and choose [Create chart from this table].
<script src="dist/plugins/chart-native.min.js"></script>
new WebEditor('#editor', { plugins: WebEditor.PRESET_BUILTIN.concat(['chart']) });
See it working in the charts demo. For details see 9-O in the SDK docs.
No. The saved HTML is inline SVG inside figure.we-chart, so it shows without the plugin — and the same in print and PDF export. Many mail services strip SVG from the message body, so for email insert the picture from the chart's right-click [Save as image (PNG)]. Load the content CSS (dist/webeditor-content.css) and charts shrink to fit narrow columns.
data-we-chart (JSON), so reopening the post in the edit screen keeps the values editable.Add the same SVG elements as the shapes feature (svg g rect line path polygon text tspan), the text attributes (font-family · font-size · font-weight · text-anchor · role · aria-label), and the figure wrapper with data-we-chart to the filter allow list.
chart: { output: 'image' }. Charts are then uploaded as PNG (uploadHandler) and saved as <img>; wait for uploads with await editor.chart.whenReady() before saving.The dialog and [Create chart from this table] read tables with the same rules as Excel. Merged two-row headers (Q3 results over Sales · Cost) become one name such as Q3 results Sales, and a wide table with January … December across is read with rows as series. If it was read the wrong way round, press [Swap rows ⇄ columns] in the dialog.
The number format follows how the cells are written — 9.0 gives one decimal place, 12% a percentage. When an amount column and a % column are mixed, the value axis follows the first series' format as in Excel, and the data grid, data labels and CSV keep the notation entered for each series. Pasting values without that notation returns the format to General; a format you picked in the dialog stays.
9.0. Excel drops formatting when it opens a CSV and shows 9; the file itself is unchanged.Pass an array of #RRGGBB colours (up to 12) as chart.palette. For the whole site, put it in chart.palette in the site configuration file or pick it with a preview in the admin settings tool's [Charts] panel.
new WebEditor('#editor', { plugins: [..., 'chart'], chart: { palette: ['#1F4E79', '#F28E2B', '#59A14F'] } });
Load the AI writing plugin (ai) and point ai.endpoint at your server to refine, proofread, summarise, translate, change the tone or length of, and tabulate selected text, and to get new drafts, continuations and title suggestions. Results appear in the panel first and go into the document only when you press [Replace].
<script src="dist/plugins/ai-native.min.js"></script>
new WebEditor('#editor', { plugins: WebEditor.PRESET_BUILTIN.concat(['ai']), ai: { endpoint: '/api/ai' } });
See it working in the AI writing demo (mock provider).
Only in environment variables on your server. The editor takes just the server address; the instructions, model and key are decided by the server. There are two server samples: Node (sdk/examples/ai-proxy-node) and Java 8 (the JSP board's /api/ai).
Before sending, the text is checked with the same rules as the document's personal-data check; if it contains values such as ID or phone numbers, a confirmation box appears (showing only masked values). You can choose [Mask and send], [Send anyway] or [Cancel], and the ai.guard option can mask or block without asking. The server samples check once more.
If this did not solve your problem, contact our technical support team directly.
📋 Copy email address View the developer manual