Page 1 of 1
Check read only from framework.js
Posted: Tue Feb 19, 2019 5:49 pm
by nstensland
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.
Thanks,
Nat
Re: Check read only from framework.js
Posted: Tue Feb 19, 2019 7:57 pm
by cristi_talau
Hello,
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
https://www.oxygenxml.com/doc/versions/ ... _framework .
Best,
Cristian