Overview
The OnlyOffice Editor control provides extensive customization options for appearance, layout, and behavior. This guide shows you how to apply custom styling and configure the editor’s visual presentation.CSS Customization
Using the Included Stylesheet
The control includes a professional stylesheet (WebEditor.css) that provides a modern, clean interface:
CSS Variables
The stylesheet uses CSS custom properties for easy theming:WebEditor.css
Custom Theme Example
- Dark Theme
- Corporate Theme
- Minimalist Theme
Create a dark theme by overriding the CSS variables:
Editor Configuration
EditorConfig Customization
The JavaScript module (OnlyOfficeEditor.js:55-70) applies default customization settings:
OnlyOfficeEditor.js
Available UI Themes
Classic Light
theme-classic-lightTraditional light interfaceClassic Dark
theme-darkDark mode interfaceContrast Dark
theme-contrast-darkHigh contrast dark themeComplete Styling Example
ASPX Page with Custom Layout
CustomEditor.aspx
CSS Classes Reference
Container Classes
| Class | Description |
|---|---|
.we | Main wrapper container |
.we-toolbar | Toolbar section |
.we-layout | Main layout grid |
.we-main | Main content area |
.we-aside | Sidebar area |
.we-surface | Card/surface container |
Component Classes
| Class | Description |
|---|---|
.we-surface__head | Card header |
.we-surface__title | Card title |
.we-surface__meta | Card metadata |
.we-btn | Button base class |
.we-btn-accent | Accent button style |
.we-btn-block | Full-width button |
.we-input | Input field |
Layout Modifiers
| Class | Description |
|---|---|
.we-surface--sticky | Makes surface sticky on scroll |
.we-toolbar__left | Left toolbar section |
.we-toolbar__right | Right toolbar section |
.we-toolbar__status | Status message area |
Loading Indicator Customization
The control includes a built-in loading overlay (OnlyOfficeEditor.ascx:5-10):
OnlyOfficeEditor.ascx
Custom Loading Spinner
Responsive Design
The default stylesheet includes responsive breakpoints:WebEditor.css
Custom Responsive Behavior
Editor Height Customization
Set Height Programmatically
Responsive Height
Advanced Layout Examples
- Full Screen Editor
- Compact View
JavaScript Customization
The module provides hooks for custom behavior (OnlyOfficeEditor.js:75-109):
Accessibility Features
The included markup uses ARIA attributes for better accessibility:Enhance Accessibility
Print Styles
Next Steps
Simple Editor
See the basic editor implementation
View Mode
Learn about read-only document display
PDF Export
Export documents to PDF format
API Reference
View complete API documentation