Check read only from framework.js

Post here questions and problems related to oXygen frameworks/document types.
Posts: 21
Joined: Wed Jan 16, 2019 5:16 am

Check read only from framework.js

Post by nstensland » Tue Feb 19, 2019 5:49 pm

Is there a way to determine at oxygen document has loaded event, if the document is read only? Looking to do this from a framework.js file on client side.


Posts: 311
Joined: Thu Sep 04, 2014 4:22 pm

Re: Check read only from framework.js

Post by cristi_talau » Tue Feb 19, 2019 7:57 pm


You can use a place some JavaScript code in the "web/framework.js" file of the framework. To get a reference to the current editor, you can use a code snippet like below:

Code: Select all

MyExtension = function() {}

MyExtension.prototype.editorCreated = function (editor) {
// ... work with the editor...
sync.ext.Registry.extension = new MyExtension();
For more details, see ... _framework .


Post Reply