@acrolinx/sidebar-sdk 2.0.3 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +28 -0
- package/dist/index.js +3386 -1871
- package/package.json +12 -8
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { DocumentSelection } from '@acrolinx/sidebar-interface';
|
|
|
11
11
|
import { Editor } from 'tinymce';
|
|
12
12
|
import { EditorFromTextArea } from 'codemirror';
|
|
13
13
|
import { EditorView } from '@codemirror/view';
|
|
14
|
+
import { EditorView as EditorView_2 } from 'prosemirror-view';
|
|
14
15
|
import { ExternalContent } from '@acrolinx/sidebar-interface';
|
|
15
16
|
import { InitParameters } from '@acrolinx/sidebar-interface';
|
|
16
17
|
import { InitResult } from '@acrolinx/sidebar-interface';
|
|
@@ -105,6 +106,7 @@ export declare interface AcrolinxSidebarIntegration {
|
|
|
105
106
|
CKEditorAdapter: typeof CKEditorAdapter;
|
|
106
107
|
CodeMirror6Adapter: typeof CodeMirror6Adapter;
|
|
107
108
|
CodeMirrorAdapter: typeof CodeMirrorAdapter;
|
|
109
|
+
ProseMirrorAdapter: typeof ProseMirrorAdapter;
|
|
108
110
|
ContentEditableAdapter: typeof ContentEditableAdapter;
|
|
109
111
|
HerettoContentEditableAdapter: typeof HerettoContentEditableAdapter;
|
|
110
112
|
AsyncContentEditableAdapter: typeof StateBasedContentEditableAdapter;
|
|
@@ -687,6 +689,32 @@ export declare interface PositionUpdate {
|
|
|
687
689
|
|
|
688
690
|
export declare type PromiseProvider<T> = () => PromiseLike<T>;
|
|
689
691
|
|
|
692
|
+
export declare class ProseMirrorAdapter implements AdapterInterface {
|
|
693
|
+
private config;
|
|
694
|
+
private currentContentChecking?;
|
|
695
|
+
private lastContentChecked?;
|
|
696
|
+
private formatDetectedByCheck;
|
|
697
|
+
constructor(conf: ProseMirrorAdapterConf);
|
|
698
|
+
configure(partialConfig: Partial<ProseMirrorAdapterConf>): void;
|
|
699
|
+
private validateConf;
|
|
700
|
+
getContent(): string;
|
|
701
|
+
getFormat(): string;
|
|
702
|
+
extractContentForCheck(opts: ExtractContentForCheckOpts): ContentExtractionResult;
|
|
703
|
+
private getSelection;
|
|
704
|
+
registerCheckResult(checkResult: SuccessfulCheckResult): void;
|
|
705
|
+
registerCheckCall(_checkInfo: Check): void;
|
|
706
|
+
private lookupMatchesOrThrow;
|
|
707
|
+
selectRanges(_checkId: string, matches: Match[]): void;
|
|
708
|
+
replaceRanges(_checkId: string, matchesWithReplacement: MatchWithReplacement[]): void;
|
|
709
|
+
private getEscapeFunction;
|
|
710
|
+
private selectRangeAndScroll;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
declare type ProseMirrorAdapterConf = {
|
|
714
|
+
editor: EditorView_2;
|
|
715
|
+
format?: string;
|
|
716
|
+
};
|
|
717
|
+
|
|
690
718
|
/**
|
|
691
719
|
* Just a proof of concept.
|
|
692
720
|
*/
|