alloy editor
  • Docs
  • Updates
  • Develop
    • About
    • Build it
    • Create
    • Create Buttons
    • Create Skins
    • Create Toolbars
    • Create entirely new UI
  • Use
    • Basic use
    • How to use it?
    • Creating a React component
    • How to use CKEditor Plugins?
    • Editor Configuration
    • Toolbar configuration
    • Button configuration
    • Read only mode
    • Skins
  • Features
    • Quote
    • Bold
    • Code
    • Horizontal Line
    • Heading 1
    • Image Alignment - Center
    • Heading 2
    • Image
    • Image Alignment - Left
    • Image Alignment - Right
    • Indent and outdent block content
    • Link
    • Link AutoComplete
    • Italic
    • Text Alignment - Centered
    • Text Alignment - Left
    • Text Alignment - Justified
    • Camera
    • Strike
    • Remove Format
    • Text Alignment - Right
    • Styles
    • Superscript
    • Subscript
    • Table
    • Table - Cells
    • Table - Columns
    • Lists (Numbered)
    • Table - Heading
    • Table - Remove
    • Table - Rows
    • Underline
    • Twitter
    • Lists (Bulleted)

Read only mode

You can set AlloyEditor to "read only" mode. In read only mode, you can not edit content and links navigate to their URL instead of opening a dialog for editing them.

Passing "readOnly" configuration property to the editor

Read only mode can be set by passing the readOnly property to the editor with the value true:

var editor = AlloyEditor.editable('editable', {
	readOnly: true
});

This behavior can be changed any time by setting the nativeEditor's read only property to false:

var nativeEditor = editor.get('nativeEditor');
nativeEditor.setReadOnly(false);

This makes the content editable again.

Liferay.com