EditorWebViewDotnetInterop Class

Class that is called from browser JavaScript to interact with the Markdown Monster UI/Editor

System.Object
   MarkdownMonster.Windows.EditorWebViewDotnetInterop

Class Members

MemberDescription
Constructor
CheckSpelling Check spelling of an individual word - called from ACE Editor THIS METHOD SHOULD BE SYNC!
public bool CheckSpelling(string text, string language, bool reload)
CopyOperation Handles copying from the current selection. Explict to always force content to \r\n to avoid potential failures with \n to editors that don't support \n only.
public Task CopyOperation()
CutOperation
public Task CutOperation()
EmbedDroppedFileAsImage Embeds a dropped file as an image. If not an image no action is taken Also allows manually sending a file with DroppedFile.ToString() as the file parameter.
public Task EmbedDroppedFileAsImage(string file, bool copyNotMove)
GetKeyBindingsJson Return keyboard bindings object as a JSON string so we can bind inside of the editor JavaScript
public string GetKeyBindingsJson()
GetSuggestions Shows spell check context menu options
public Task GetSuggestions(string text, string language, bool reload, string jsonRange)
GotFocus ACE Editor Notification when focus is set to the editor
public Task GotFocus()
InitializeInterop Initial call *into* JavaScript. Sync call that doesn't wait and doesn't resync to current thread
public void InitializeInterop()
InitializeInteropAsync Intial Call into JavaScript
public Task InitializeInteropAsync()
IsDirty This is multi-purpose function that: * Retrieves the text from the editor into the Document.CurrentText * Checks to see if the previous CurrentText matches the retrieved text This is the current…
public bool IsDirty(bool previewIfDirty, string markdown)
IsPreviewToEditorSync Checks to see if the editor and preview are synced and if scrolling the preview needs to scroll the editor.
public bool IsPreviewToEditorSync()
KeyboardCommand Performs the special key operation that is tied to the key in the application. ctrl-s,ctrl-n, ctrl-o, cltr-i,ctrl-b,ctrl-l,ctrl-k,alt-c,ctrl-shift-v,ctrl-shift-c,ctlr-shift-down,ctrl-shift-up
public Task KeyboardCommand(string key, string action)
LostFocus ACE Editor Notification when focus is lost
public Task LostFocus()
OpenEditorContextMenu
public Task OpenEditorContextMenu(int mouseLeft, int mouseTop)
PasteOperation Handle pasting and handle images None - always true
public Task PasteOperation()
PreviewContextMenu Shows the WPF Preview menu
public Task PreviewContextMenu(string positionAndElementType)
PreviewLinkNavigation Fired when a link is clicked in the preview editor. Opens a new external browser instance with the URL opened or opens certain supported files (like other markdown files) in the editor.
public Task PreviewLinkNavigation(string url, string src)
PreviewMarkdownCallback Callback handler callable from JavaScript editor
public Task PreviewMarkdownCallback(bool dontGetMarkdown, int editorLineNumber, bool noPreviewScrolling)
RestyleEditor
public Task RestyleEditor(bool forceSync, bool initialize)
ScrollPreviewToEditorLineCallback Scrolls the preview editor - typically in response to editor scroll or click operations based on the PreviewSyncMode setting
public Task ScrollPreviewToEditorLineCallback(int editorLineNumber, bool updateCodeBlocks, bool noScrollTimeout, bool noScrollTopAdjustment)
SetEditorFocus
public Task SetEditorFocus()
SetPreviewMode Sets the currently selected tab to or off of Preview Mode
public void SetPreviewMode(bool clearPreviewMode)
Test
public string Test()
TriggerWindowAltMenu Call this to trigger the Alt-Window command to show underlines and activate the Window to navigate the shortcut menus. Client code calls this after short alt-key delay from OnKey Handler.
public Task TriggerWindowAltMenu()
UpdateDocumentStats Callback to force updating of the status bar document stats
public Task UpdateDocumentStats(string jsonStats)
JsInterop Optional reference to the JavaScript interop that allows calling into JavaScript from .NET code. Provided primarily as a helper to make it easier to access JS code internally as well as for .NET…
Model
WebBrowser
Window
Namespace: MarkdownMonster.Windows

Assembly: MarkdownMonster.dll



© West Wind Technologies, 2025 • Updated: 2025-02-25
Comment or report problem with topic