@@ -1003,6 +1003,78 @@ Props for the `DraftJSVeltEditor` React wrapper.
10031003
10041004For the CommentAnnotation model referenced above, see [CommentAnnotation](#commentannotation).
10051005
1006+ ### ProseMirror
1007+
1008+ #### AddCommentRequest
1009+
1010+ ---
1011+
1012+ | Property | Type | Required | Description |
1013+ | ---------- | ---------------------------------------------------- | -------- | ---------------------------------------------------- |
1014+ | `view` | `EditorView` | Yes | ProseMirror editor view instance. |
1015+ | `editorId` | `string` | No | Optional editor ID used to scope operations. |
1016+ | `context` | [`CommentAnnotationContext`](#commentannotationcontext-1) | No | Optional custom context to attach to the annotation. |
1017+
1018+ #### RenderCommentsRequest
1019+
1020+ ---
1021+
1022+ | Property | Type | Required | Description |
1023+ | -------------------- | --------------------- | -------- | -------------------------------------------- |
1024+ | `view` | `EditorView` | Yes | ProseMirror editor view instance. |
1025+ | `editorId` | `string` | No | Optional editor ID used to scope operations. |
1026+ | `commentAnnotations` | `CommentAnnotation[]` | No | Annotations to render/highlight. |
1027+
1028+ For the CommentAnnotation model referenced above, see [CommentAnnotation](#commentannotation).
1029+
1030+ #### VeltCommentsPluginConfig
1031+
1032+ ---
1033+
1034+ Configuration options for the `VeltCommentsPlugin()` function.
1035+
1036+ | Property | Type | Required | Description |
1037+ | ------------------ | --------- | -------- | --------------------------------------------------------------------------------- |
1038+ | `editorId` | `string` | No | Unique identifier for this editor instance. Use it for multi-editor scenarios. |
1039+ | `persistVeltMarks` | `boolean` | No | Reserved for API parity. ProseMirror highlights are always view-only overlays. |
1040+
1041+ #### CommentAnnotationContext
1042+
1043+ ---
1044+
1045+ Context object for comment annotations. Contains text editor configuration and any additional custom metadata.
1046+
1047+ | Property | Type | Required | Description |
1048+ | ------------------ | ----------------------------------------- | -------- | ---------------------------------------------------------- |
1049+ | `textEditorConfig` | [`TextEditorConfig`](#texteditorconfig-2) | No | Text editor configuration auto-generated by the library. |
1050+ | `[key: string]` | `unknown` | No | Any additional custom properties you want to attach. |
1051+
1052+ #### TextEditorConfig
1053+
1054+ ---
1055+
1056+ Nested in `CommentAnnotationContext`.
1057+
1058+ | Property | Type | Required | Description |
1059+ | ------------ | -------- | -------- | ------------------------------------------------- |
1060+ | `text` | `string` | Yes | The selected text content. |
1061+ | `occurrence` | `number` | Yes | The occurrence index of the text in the document. |
1062+ | `editorId` | `string` | No | The editor ID associated with this comment. |
1063+
1064+ #### SelectionContext
1065+
1066+ ---
1067+
1068+ Context extracted from the current ProseMirror editor selection.
1069+
1070+ | Property | Type | Required | Description |
1071+ | ------------ | -------- | -------- | ---------------------------------------------------------------------- |
1072+ | `text` | `string` | Yes | Selected text content. |
1073+ | `from` | `number` | Yes | ProseMirror start position of the selection. |
1074+ | `to` | `number` | Yes | ProseMirror end position of the selection. |
1075+ | `occurrence` | `number` | Yes | 1-based index of `text` among all matches in the document. |
1076+ | `locationId` | `string` | No | Optional Velt location id derived from a `data-velt-location-id` ancestor. |
1077+
10061078### Messages
10071079
10081080#### ENUMs
0 commit comments