A Plugin which adds restrictions to the model of monaco-editor, so that only some parts of the code are editable and rest will become read-only
monaco-editorrestrictions-in-editoredit-area-restriction
https://github.com/Pranomvignesh/constrained-editor-plugin#readme