Dcoument opened in Non-Editable Mode

Integration questions/issues
Post Reply
ahsan_0273
Posts: 5
Joined: Fri Jun 28, 2019 12:22 pm

Dcoument opened in Non-Editable Mode

Post by ahsan_0273 » Thu Jul 04, 2019 8:00 am

I Just wrote the document Editor code and place the document Url and call back URL but my document is opening in no-editable mode.
These are the permissions detail which i added to open the document.
const docEditor = new DocsAPI.DocEditor('placeholder',
{
events: {
onDocumentReady: onDocumentReady
},
type: type,
width: (type === 'desktop' ? '100%' : undefined),
height: (type === 'desktop' ? '100%' : undefined),
documentType: documentType,
document: {
title: ' ',
url: 'http://xx.xxx.xxx.xxx:xx/documentId,
fileType: docType,
key: docKey,
permissions: {
'edit': true,
'review': true,
'download': true,
}
},
editorConfig: {
mode: 'edit',
user: {
id: user, // we are using this user id for user generated custom comments identification
name: 'UserName'
},
customization: {
autosave: true,
compactToolbar: true,
forcesave: true
},
callbackUrl: 'http://xx.xxx.xxx.xxx:xx/onlyoffice/handler
}
});
}

Maxim
Posts: 2017
Joined: Tue Oct 11, 2016 2:34 pm

Re: Dcoument opened in Non-Editable Mode

Post by Maxim » Fri Jul 05, 2019 7:11 am

Hello ahsan_0273!
It looks good. I used your code with my Urls and it works as it should.
Except here where quotes should be - callbackUrl: 'http://xx.xxx.xxx.xxx:xx/onlyoffice/handler

ahsan_0273
Posts: 5
Joined: Fri Jun 28, 2019 12:22 pm

Re: Dcoument opened in Non-Editable Mode

Post by ahsan_0273 » Fri Jul 05, 2019 12:25 pm

Yes, It's working fine when I upload the Docx but when I upload the pdf file and convert it into Docx and then add few content controls, OnlyOffice hides few content controls and makes my document non-editable.

ahsan_0273
Posts: 5
Joined: Fri Jun 28, 2019 12:22 pm

Re: Dcoument opened in Non-Editable Mode

Post by ahsan_0273 » Fri Jul 05, 2019 12:52 pm

You can see in the attached image.
Attachments
Non-Editable.PNG
Non-Editable.PNG (106.17 KiB) Viewed 241 times

Maxim
Posts: 2017
Joined: Tue Oct 11, 2016 2:34 pm

Re: Dcoument opened in Non-Editable Mode

Post by Maxim » Mon Jul 08, 2019 7:10 am

Hello ahsan_0273!
...when I upload the pdf file and convert it into Docx...
There is no way to convert PDF into DOCX. Check it here

Post Reply