Check read only from framework.js

Post here questions and problems related to oXygen frameworks/document types.
nstensland
Posts: 14

Check read only from framework.js

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.

Thanks,
Nat
cristi_talau
Posts: 198

Re: Check read only from framework.js

Tue Feb 19, 2019 7:57 pm

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

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 0 guests