diff --git a/README.md b/README.md index aedae61..70e5e6d 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,8 @@ pass a set of attributes to apply to each default block: var editor = new Squire( document, { blockTag: 'P', - blockAttributes: { style: 'font-size: 16px;' } + blockAttributes: { style: 'font-size: 16px;' }, + readOnly: false // default is true }) If using the simple setup, call `editor.setConfig(…);` with your diff --git a/source/Editor.js b/source/Editor.js index d16ab84..d55b1e6 100644 --- a/source/Editor.js +++ b/source/Editor.js @@ -146,7 +146,7 @@ function Squire ( root, config ) { }; } - root.setAttribute( 'contenteditable', 'true' ); + root.setAttribute( 'contenteditable', !(config.readOnly || false) ); // Remove Firefox's built-in controls try {