groupdocs-editor / GroupDocs.Editor-for-Java

GroupDocs.Editor for Java examples, plugins and showcase projects
https://products.groupdocs.com/editor/java
MIT License
2 stars 4 forks source link

Can we allow editing certain part of a document and restrict other #18

Closed atirtahirgroupdocs closed 3 years ago

atirtahirgroupdocs commented 3 years ago

This issue is raised in https://forum.groupdocs.com/t/editing-certain-parts-of-a-document-using-java/9992 Hi, GroupDocs.Editor for Java doesn't provide any such feature. But is there any workaround at front-end level? Can we allow editing certain part of a document and block the rest?

denis-gvardionov commented 3 years ago

Hello!

When you use a GroupDocs.Editor for editing documents, you actually convert an input DOC/DOCX document to a set of HTML/CSS markups and resources, which are editable in most of usual HTML-editors (like TinyMCE, CKeditor, or Summernote, for example, but actually it can be any WYSIWYG HTML-editor). GroupDocs.Editor is a server-side library, it obtains a document on input and generates an HTML markup from it; this markup then is sent to the HTML-editor on a client-side, is edited there by the end-user, and then is passed back to the server-side, where GroupDocs.Editor generates an output document from it. From this you can see, that GroupDocs.Editor is a pure server-side library, that doesn't touch a front-end editor at all.

On the other hand, your intention to restrict the some parts of a document from editing implies involving especially a client-side editor, into which the generated markup is loaded. HTML markup in this case is treated as data, pure content, which cannot restrict itself from editing; it should be restricted by the software, which is processing it - HTML-editor in this case.

GroupDocs.Editor has an ability to protect documents from editing, but this protection is applied to the output document, which is generated from edited markup, which is sent back from the client-side editor to the server side (more on that here: https://docs.groupdocs.com/editor/java/document-protection/ )

So, answering to your question: its up to you to support an ability to allow editing a certain part of a document and restrict other parts, because this feature should be present in a client-side browser-based WYSIWYG HTML-editor, but not in the document content.

yevgen-nykytenko commented 3 years ago

I'm closing the issue. If there are other questions please reopen this issue or create a new one. Thanks.