documents.md: handle read-only behavior

This commit is contained in:
Yann Cébron 2025-05-08 16:06:44 +02:00
parent 65456cc4ce
commit 8af1ef4f34
2 changed files with 3 additions and 1 deletions

View File

@ -69,3 +69,6 @@ This is particularly useful when you need text location/offset information about
## How can I mark a region as read-only?
Use `Document.createGuardedBlock()`.
[`EditorActionManager.setReadonlyFragmentModificationHandler()`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/editor/actionSystem/EditorActionManager.java) can
be used to customize the behavior when the user attempts to modify a read-only region.

View File

@ -36,7 +36,6 @@ for programmatic registration.
* [Why doesn't the file change on disk after I changed it through the PSI?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206791625-Action-doesn-t-see-changes-in-xml-file)
* [Can I hook into the file save logic?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206790685-Can-you-tie-into-the-file-save-logic-)
* [How do I control what happens when the user tries to edit such a part?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206791375-Using-locked-regions)
* [How can I show several editors for a single file in tabs?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206795495-Alternative-Editors-ala-HTML-Preview)
## General