How to lock certain keywords or text by regex expression in a document?

Hello,

I have some tags in the document which my user should not edit. I was trying to create a plugin that makes those tags uneditable by the user on event_onDocumentContentReady.

Tags are just some normal text similar to {firstname}.

Are there any methods that make my tags uneditable??

hi @nitesh :handshake:

Possibly, you are referring to the capability of “Allow changes to parts of a protected document.”

https://forum.onlyoffice.com/t/make-portion-of-document-read-only/4523

https://forum.onlyoffice.com/t/how-do-i-use-sdkjs-dynamically-to-set-the-document-read-only/4480/13