DevExtreme Accessibility Compliance
DevExtreme component libraries meet a variety of WCAG and Section 508 compliance standards. To assess this demo's accessibility level, click the Run AXE® Validation button to launch the AXE® web accessibility evaluation tool.
All trademarks or registered trademarks are property of their respective owners. AXE® Terms of Use
The overall accessibility level of your application depends on the HtmlEditor features used.
Backend API
<dx-html-editor height="725px" [value]="valueContent">
<dxo-html-editor-toolbar [multiline]="isMultiline">
<dxi-html-editor-item name="undo"></dxi-html-editor-item>
<dxi-html-editor-item name="redo"></dxi-html-editor-item>
<dxi-html-editor-item name="separator"></dxi-html-editor-item>
<dxi-html-editor-item
name="size"
[acceptedValues]="['8pt', '10pt', '12pt', '14pt', '18pt', '24pt', '36pt']"
[options]="{ inputAttr: { 'aria-label': 'Font size' } }"
></dxi-html-editor-item>
<dxi-html-editor-item
name="font"
[acceptedValues]="[
'Arial',
'Courier New',
'Georgia',
'Impact',
'Lucida Console',
'Tahoma',
'Times New Roman',
'Verdana'
]"
[options]="{ inputAttr: { 'aria-label': 'Font family' } }"
></dxi-html-editor-item>
<dxi-html-editor-item name="separator"></dxi-html-editor-item>
<dxi-html-editor-item name="bold"></dxi-html-editor-item>
<dxi-html-editor-item name="italic"></dxi-html-editor-item>
<dxi-html-editor-item name="strike"></dxi-html-editor-item>
<dxi-html-editor-item name="underline"></dxi-html-editor-item>
<dxi-html-editor-item name="separator"></dxi-html-editor-item>
<dxi-html-editor-item name="alignLeft"></dxi-html-editor-item>
<dxi-html-editor-item name="alignCenter"></dxi-html-editor-item>
<dxi-html-editor-item name="alignRight"></dxi-html-editor-item>
<dxi-html-editor-item name="alignJustify"></dxi-html-editor-item>
<dxi-html-editor-item name="separator"></dxi-html-editor-item>
<dxi-html-editor-item name="orderedList"></dxi-html-editor-item>
<dxi-html-editor-item name="bulletList"></dxi-html-editor-item>
<dxi-html-editor-item name="separator"></dxi-html-editor-item>
<dxi-html-editor-item
name="header"
[acceptedValues]="[false, 1, 2, 3, 4, 5]"
[options]="{ inputAttr: { 'aria-label': 'Header' } }"
></dxi-html-editor-item>
<dxi-html-editor-item name="separator"></dxi-html-editor-item>
<dxi-html-editor-item name="color"></dxi-html-editor-item>
<dxi-html-editor-item name="background"></dxi-html-editor-item>
<dxi-html-editor-item name="separator"></dxi-html-editor-item>
<dxi-html-editor-item name="link"></dxi-html-editor-item>
<dxi-html-editor-item name="image"></dxi-html-editor-item>
<dxi-html-editor-item name="separator"></dxi-html-editor-item>
<dxi-html-editor-item name="clear"></dxi-html-editor-item>
<dxi-html-editor-item name="codeBlock"></dxi-html-editor-item>
<dxi-html-editor-item name="blockquote"></dxi-html-editor-item>
<dxi-html-editor-item name="separator"></dxi-html-editor-item>
<dxi-html-editor-item name="insertTable"></dxi-html-editor-item>
<dxi-html-editor-item name="deleteTable"></dxi-html-editor-item>
<dxi-html-editor-item name="insertRowAbove"></dxi-html-editor-item>
<dxi-html-editor-item name="insertRowBelow"></dxi-html-editor-item>
<dxi-html-editor-item name="deleteRow"></dxi-html-editor-item>
<dxi-html-editor-item name="insertColumnLeft"></dxi-html-editor-item>
<dxi-html-editor-item name="insertColumnRight"></dxi-html-editor-item>
<dxi-html-editor-item name="deleteColumn"></dxi-html-editor-item>
</dxo-html-editor-toolbar>
<dxo-html-editor-media-resizing [enabled]="true">
</dxo-html-editor-media-resizing>
<dxo-html-editor-image-upload [tabs]="currentTab" fileUploadMode="base64">
</dxo-html-editor-image-upload>
</dx-html-editor>
<div class="options">
<div class="caption">Options</div>
<div class="option">
<dx-check-box
text="Multiline toolbar"
[(value)]="isMultiline"
></dx-check-box>
</div>
<div class="option">
<div class="label">Image upload tabs:</div>
<dx-select-box
[items]="tabs"
[inputAttr]="{ 'aria-label': 'Tab' }"
[(value)]="currentTab"
valueExpr="value"
displayExpr="name"
>
</dx-select-box>
</div>
</div>
import { bootstrapApplication } from '@angular/platform-browser';
import { Component, enableProdMode, provideZoneChangeDetection } from '@angular/core';
import { DxHtmlEditorModule, DxCheckBoxModule, DxSelectBoxModule } from 'devextreme-angular';
import { Service, TabConfig } from './app.service';
if (!/localhost/.test(document.location.host)) {
enableProdMode();
}
@Component({
selector: 'demo-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
providers: [Service],
imports: [
DxHtmlEditorModule,
DxCheckBoxModule,
DxSelectBoxModule,
],
})
export class AppComponent {
isMultiline = true;
valueContent: string;
tabs: TabConfig[];
currentTab: string[];
constructor(service: Service) {
this.valueContent = service.getMarkup();
this.tabs = service.getTabsData();
this.currentTab = this.tabs[2].value;
}
}
bootstrapApplication(AppComponent, {
providers: [
provideZoneChangeDetection({ eventCoalescing: true, runCoalescing: true }),
],
});
::ng-deep .dx-htmleditor-content img {
vertical-align: middle;
padding-right: 10px;
}
::ng-deep .dx-htmleditor-content table {
width: 50%;
}
.options {
padding: 20px;
background-color: rgba(191, 191, 191, 0.15);
margin-top: 20px;
}
.caption {
font-size: 18px;
font-weight: 500;
}
.option {
margin-top: 10px;
display: inline-block;
margin-right: 40px;
}
::ng-deep .option > .dx-selectbox,
::ng-deep .option > .label {
display: inline-block;
vertical-align: middle;
}
::ng-deep .option > .label {
margin-right: 10px;
}
import { Injectable } from '@angular/core';
export class TabConfig {
name: string;
value: string[];
}
const markup = `
<h2>
<img src="../../../../images/widgets/HtmlEditor.svg" alt="HtmlEditor">
Formatted Text Editor (HTML Editor)
</h2>
<br>
<p>DevExtreme JavaScript HTML Editor is a client-side WYSIWYG text editor that allows its users to format textual and visual content and store it as HTML.</p>
<p>Supported features:</p>
<ul>
<li>Inline formats:
<ul>
<li><strong>Bold</strong>, <em>italic</em>, <s>strikethrough</s> text formatting</li>
<li>Font, size, color changes (HTML only)</li>
</ul>
</li>
<li>Block formats:
<ul>
<li>Headers</li>
<li>Text alignment</li>
<li>Lists (ordered and unordered)</li>
<li>Code blocks</li>
<li>Quotes</li>
</ul>
</li>
<li>Custom formats</li>
<li>Mail-merge placeholders (for example, %username%)</li>
<li>Adaptive toolbar for working images, links, and color formats</li>
<li>Image upload: drag-and-drop images onto the form, select files from the file system, or specify a URL.</li>
<li>Copy-paste rich content (unsupported formats are removed)</li>
<li>Tables support</li>
</ul>
<br>
<p>Supported frameworks and libraries</p>
<table>
<tr>
<td><strong>jQuery</strong></td>
<td style="text-align: right;">v2.1 - v2.2 and v3.x</td>
</tr>
<tr>
<td><strong>Angular</strong></td>
<td style="text-align: right;">v7.0+</td>
</tr>
<tr>
<td><strong>React</strong></td>
<td style="text-align: right;">v16.2+</td>
</tr>
<tr>
<td><strong>Vue</strong></td>
<td style="text-align: right;">v2.6.3+</td>
</tr>
</table>
`;
const tabsData: TabConfig[] = [
{ name: 'From This Device', value: ['file'] },
{ name: 'From the Web', value: ['url'] },
{ name: 'Both', value: ['file', 'url'] },
];
@Injectable()
export class Service {
getMarkup(): string {
return markup;
}
getTabsData(): TabConfig[] {
return tabsData;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>DevExtreme Demo</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" />
<link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/26.1.5/css/dx.light.css" />
</head>
<body class="dx-viewport">
<div class="demo-container">
<demo-app>Loading...</demo-app>
</div>
<script src="https://cdn.jsdelivr.net/npm/zone.js@0.16.2/bundles/zone.umd.js"></script>
<script src="./bundle.js" type="module"></script>
</body>
</html>
You can use the toolbar.multiline property to arrange the toolbar controls into multiple rows.
Users can resize media files when the mediaResizing is enabled. Currently, only images are supported.
To get started with the DevExtreme HTML Editor component, refer to the following tutorial for step-by-step instructions: Getting Started with HTML Editor.