I hope that the implementation can judge whether the user can edit according to the number of lines in the word document where the user’s mouse is located.
Now I can get the line number of the user, as shown below
Please tell me the api to set document read-only, thanks a lot
Please describe the issue in more details.
You can see all Advanced parameters (clickable)
and Document Permissions (edit)
I don’t mean the server document.
I pulled web-apps and sdkjs from github and now I can’t find the api available in sdkjs, for example read only
Please point me to the guide which you used. Your final goal isn’t clear for us at the moment. As mentioned before ‘Read’ mode is related to editor initialization config file.
var docEditor = new DocsAPI.DocEditor("placeholder", config);
Disable the editor using
OMG, I can’t believe I got a reply. I modified the source code to fix the problem.
How to implement it? I am also looking for it, but I haven’t found any relevant APIs yet
Hello @huzedong2022 and @hufei
I’m not entirely sure that I’m following the situation, so please update the status of your case. I’m trying to understand the final goal of your actions.
@Alexandre okay, I have a Word document, and when there are multiple users editing it simultaneously, I need to assign specific areas to specific users. For instance, if Heading 1 is assigned to the admin, then he can only edit Heading 1, and the rest is read-only. Sometimes, I may need to specify that an area is not visible. The above was the help I sought in March. However, I have already implemented this, apart from the part about hiding specific areas. As for hiding specific areas, I have read through the code of sdkjs and webapps, and I believe I can do it. Lastly, what I want to say is that I have also submitted bug-fixing code to you and it has been accepted. This was my first time, and I feel very happy.
Thank you for provided details and we are glad that your submitted code was accepted. We appreciate any help with bugs detection from the community!
I need to assign specific areas to specific users. For instance, if Heading 1 is assigned to the admin, then he can only edit Heading 1, and the rest is read-only. Sometimes, I may need to specify that an area is not visible.
We are working on this feature right now, I have added your request and will update this thread when we have something to share.
However, I have already implemented this, apart from the part about hiding specific areas.
You can create a pull request on GitHub, if you want to share your code and experience: https://github.com/ONLYOFFICE/DocumentServer
It seems this is a slightly different case (hiding content control for certain users). However, we are working on the both cases.