- Home
- DocSpace
- Administration
- Codemirror: viewing and editing code files
Codemirror: viewing and editing code files
ONLYOFFICE DocSpace provides you with a codemirror plugin that can view and edit files with various programming code formats.
Configuring codemirror
In ONLYOFFICE DocSpace, system plugins can be enabled by the owner and administrators. Once enabled, the plugins are available to all users.
- Go to the DocSpace Settings -> Integration -> Plugins.
- Click the toggle next to the codemirror plugin to activate it.
To start working with the plugin, it is not needed to change the default settings, but you can enable or disable some plugin parameters:
- Go to the DocSpace Settings -> Integration -> Plugins.
-
Click the gear symbol next to the codemirror plugin.
-
You can enable or disable the following plugin parameters:
- Highlight whitespaces - display whitespaces as dots and tabs as arrows.
- Highlight trailing whitespaces - highlight whitespaces at the end of a line.
- Auto close tags - automatically insert closing tags when a > or / character is typed in HTML-like files.
- Click Save to apply the settings.
Using codemirror
Creating a new file
-
The plugin is available via the Actions button -> More in the Documents section or in the selected room.
-
When you click Text file, a pop-up window appears where you can change/enter the file name. Make sure to include the appropriate file extension, such as
style.css,script.js, etc.
- Click Create to open the Codemirror code editor in a new pop-up window where you can edit the file content. The list of available keyboard shortcuts is displayed to the right of the editing area.
- To save the changes, click Save. To close the editor, click the cross in the upper right corner of the pop-up window.
- The newly created file appears in the file list.
Editing files
You can open previously created or uploaded files using the Codemirror plugin. Click the file name with the Codemirror icon, or open the file context menu, navigate to More options, and select Edit file with Codemirror.
Codemirror interface
Supported languages
- C (
cpp,cc,h,hpp) - CSS
- Go
- HTML / HTM
- Java (
java,class) - JavaScript / TypeScript (
js,jsx,ts,tsx) - JSON
- Liquid
- PHP
- Python
- Rust
- SCSS (
sass,scss) - SQL (
sql,mysql,pgsql,postgresql,sqlite,db,mssql,cql,plsql,mariadb) - WAST
- YAML
Article with the tag:
Browse all tags