You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Manages the undo and redo history for PDF annotation actions within a viewer component. including checking if undo/redo actions are available and performing those actions. It also allows registering a listener to monitor changes in the annotation history state.
Copy file name to clipboardExpand all lines: CONFIGURATION.md
+237-1Lines changed: 237 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,7 +138,8 @@ Configure functions for the top toolbar in the PDF view.
138
138
| iosLeftBarAvailableActions | Array | Functions available in the left side of the top toolbar for iOS platform.<br />Defaults: `back`, `thumbnail`|
139
139
| iosRightBarAvailableActions | Array | Functions available in the right side of the top toolbar for iOS platform.<br />Defaults: `search`, `bota`, `menu`|
140
140
| availableMenus | Array | A list of more functions popped up by the `menu` option on the top toolbar. |
141
-
| mainToolbarVisible | boolean | 是否显示主界面视图顶部工具栏 |
141
+
| mainToolbarVisible | boolean | Whether to display the toolbar at the top of the main interface view. |
142
+
| annotationToolbarVisible | boolean | Shows or hides the annotation toolbar that appears at the bottom of the view when in annotation mode. |
142
143
143
144
##### **Constants**
144
145
@@ -802,7 +803,242 @@ This section is used to configure the types of forms enabled in the view's botto
802
803
| dark | The UI is displayed in a dark theme. |
803
804
| system | Theme follow system settings. |
804
805
806
+
#### contextMenuConfig
805
807
808
+
Used to configure the context menu options that pop up when selecting text, annotations, forms, etc. in different modes.
809
+
810
+
##### global
811
+
812
+
Used to configure global context menu items that are not tied to a specific mode (such as annotation, editing, or form mode). Currently, only the screenshot context is supported.
813
+
814
+
**screenshot**
815
+
816
+
Defines available actions during screenshot mode (e.g., area capture tools).
817
+
818
+
```json
819
+
"contextMenuConfig" : {
820
+
"global": {
821
+
"screenshot" : [
822
+
{ "key": "exit" },
823
+
{ "key": "share" }
824
+
]
825
+
}
826
+
}
827
+
```
828
+
829
+
|**Key**|**Description**|
830
+
| ------- | --------------------- |
831
+
| exit | Exit screenshot mode. |
832
+
| share | Share the screenshot. |
833
+
834
+
> ✅ Note: The order of the items determines how they appear in the menu. If not set, the default menu options will be used.
835
+
836
+
##### viewMode
837
+
838
+
Configures context menu options in **View Mode**, which applies to normal reading scenarios. Currently supports the textSelect context when selecting text.
839
+
840
+
```json
841
+
"contextMenuConfig" : {
842
+
"viewMode": {
843
+
"textSelect": [
844
+
{ "key": "copy" }
845
+
]
846
+
}
847
+
}
848
+
```
849
+
850
+
##### annotationMode
851
+
852
+
Configures context menu options available in **Annotation Mode**, where different types of annotation targets (e.g., text, markup, stamp) show contextual menu actions.
853
+
854
+
```json
855
+
"contextMenuConfig" : {
856
+
"annotationMode": {
857
+
"textSelect": [
858
+
{ "key": "copy" },
859
+
{ "key": "highlight" },
860
+
{ "key": "underline" },
861
+
{ "key": "strikeout" },
862
+
{ "key": "squiggly" }
863
+
],
864
+
"longPressContent": [
865
+
{ "key": "paste" },
866
+
{ "key": "note" },
867
+
{ "key": "textBox" },
868
+
{ "key": "stamp" },
869
+
{ "key": "image" }
870
+
],
871
+
"markupContent": [
872
+
{ "key": "properties" },
873
+
{ "key": "note" },
874
+
{ "key": "reply" },
875
+
{ "key": "viewReply" },
876
+
{ "key": "delete" }
877
+
],
878
+
"soundContent": [
879
+
{ "key": "reply" },
880
+
{ "key": "viewReply" },
881
+
{ "key": "play" },
882
+
{ "key": "record" },
883
+
{ "key": "delete" }
884
+
],
885
+
"inkContent": [
886
+
{ "key": "properties" },
887
+
{ "key": "note" },
888
+
{ "key": "reply" },
889
+
{ "key": "viewReply" },
890
+
{ "key": "delete" }
891
+
],
892
+
"shapeContent": [
893
+
{ "key": "properties" },
894
+
{ "key": "note" },
895
+
{ "key": "reply" },
896
+
{ "key": "viewReply" },
897
+
{ "key": "delete" }
898
+
],
899
+
"freeTextContent": [
900
+
{ "key": "properties" },
901
+
{ "key": "edit" },
902
+
{ "key": "reply" },
903
+
{ "key": "viewReply" },
904
+
{ "key": "delete" }
905
+
],
906
+
"signStampContent": [
907
+
{ "key": "signHere" },
908
+
{ "key": "delete" },
909
+
{ "key": "rotate" }
910
+
],
911
+
"stampContent": [
912
+
{ "key": "note" },
913
+
{ "key": "reply" },
914
+
{ "key": "viewReply" },
915
+
{ "key": "delete" },
916
+
{ "key": "rotate" }
917
+
],
918
+
"linkContent": [
919
+
{ "key": "edit" },
920
+
{ "key": "delete" }
921
+
]
922
+
}
923
+
}
924
+
```
925
+
926
+
##### contentEditorMode
927
+
928
+
The context menu in content editing mode handles the context menu options that pop up for different operations such as selecting text, images, and long pressing the page.
929
+
930
+
```json
931
+
"contextMenuConfig" : {
932
+
"contentEditorMode": {
933
+
"editTextAreaContent" : [
934
+
{ "key": "properties" },
935
+
{ "key": "edit" },
936
+
{ "key": "cut" },
937
+
{ "key": "copy" },
938
+
{ "key": "delete" }
939
+
],
940
+
"editSelectTextContent": [
941
+
{ "key": "properties" },
942
+
{
943
+
"key": "opacity",
944
+
"subItems": ["25%", "50%", "75%", "100%"]
945
+
},
946
+
{ "key": "cut" },
947
+
{ "key": "copy" },
948
+
{ "key": "delete" }
949
+
],
950
+
"editTextContent": [
951
+
{ "key": "select" },
952
+
{ "key": "selectAll" },
953
+
{ "key": "paste" }
954
+
],
955
+
"imageAreaContent": [
956
+
{ "key": "properties" },
957
+
{ "key": "rotateLeft" },
958
+
{ "key": "rotateRight" },
959
+
{ "key": "replace" },
960
+
{ "key": "export" },
961
+
{
962
+
"key": "opacity",
963
+
"subItems": ["25%", "50%", "75%", "100%"]
964
+
},
965
+
{ "key": "flipHorizontal" },
966
+
{ "key": "flipVertical" },
967
+
{ "key": "crop" },
968
+
{ "key": "delete" },
969
+
{ "key": "copy" },
970
+
{ "key": "cut" }
971
+
],
972
+
"imageCropMode": [
973
+
{ "key": "done" },
974
+
{ "key": "cancel" }
975
+
],
976
+
"editPathContent": [
977
+
{ "key": "delete" }
978
+
],
979
+
"longPressWithEditTextMode" : [
980
+
{ "key" : "addText"},
981
+
{ "key" : "paste"},
982
+
{ "key" : "keepSourceFormatingPaste"}
983
+
],
984
+
"longPressWithEditImageMode" : [
985
+
{ "key" : "addImages"},
986
+
{ "key" : "paste"}
987
+
],
988
+
"longPressWithAllMode" : [
989
+
{ "key" : "paste"},
990
+
{ "key" : "keepSourceFormatingPaste"}
991
+
],
992
+
"searchReplace": [
993
+
{ "key": "replace" }
994
+
]
995
+
}
996
+
}
997
+
```
998
+
999
+
##### formMode
1000
+
1001
+
The context menu configuration in form mode displays different context menu options according to the object the user operates on (such as text field, list, radio button, etc.)
0 commit comments