How to change "readonly" annotation style

Q:
How to change the styling for an “ReadOnly” annotation
For example: I have an freehand annotation, and I want to change the “ReadOnly” status (red border) to green
image

A:
You can change the color with this property PDFTron WebViewer Class: SelectionModel

const { Annotations } = instance;
Annotations.SelectionModel.defaultNoPermissionSelectionOutlineColor = new Annotations.Color(0, 255, 0, 1)

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums: