EditorWebViewJavaScriptInterop Class

This class is used to call into the JavaScript document and perform operations there.

Note there's no inheritance/Composition as this interface requires Async operation, while the COM interface for WebBrowser control requires sync operation.

System.Object
   Westwind.WebView.Wpf.BaseJavaScriptInterop
      MarkdownMonster.Windows.EditorWebViewJavaScriptInterop

Class Members

MemberDescription
Constructor
AdjustPadding
public Task AdjustPadding(bool forceRefresh)
ClearSelection
public Task ClearSelection()
DeleteCurrentLine
public Task DeleteCurrentLine()
EnableSpellChecking Enable spell checking
public Task EnableSpellChecking(bool disable, string dictionary)
ExecCommand Execute an ACE Editor Command with an optional parameter
public Task ExecCommand(string action, string parm)
FindAndReplaceText
public Task FindAndReplaceText(string search, string replace)
FindAndReplaceTextInCurrentLine
public Task FindAndReplaceTextInCurrentLine(string search, string replace)
FindAndSelectTextInCurrentLine Finds search text in the current line and if found selects it
public Task FindAndSelectTextInCurrentLine(string search)
FindText Finds first match and displays it in the editor
public Task FindText(string search)
GetCharacterOffset Returns the character offset position in the document of the current cursor position or the (row/column) position passed in.
public Task GetCharacterOffset(AcePosition pos)
GetCurrentLine Returns the text of the currently active line in the editor
public Task GetCurrentLine()
GetCursorPosition Returns the current cursor position as an object
public Task GetCursorPosition()
GetFontSize Returns a font object
public Task GetFontSize()
GetJsonStyleInfo Gets a JSON string of all the settings that are exported to the ACE Editor instance when styling the editor. This object is passed down to ACE which can then uses these settings to update the editor…
public string GetJsonStyleInfo(ApplicationConfiguration config)
GetLine Returns the text of the currently active line in the editor
public Task GetLine(int row)
GetLineNumber
public Task GetLineNumber()
GetScrollPosition Returns the editor's vertical scroll position
public Task GetScrollPosition()
GetScrollTop Returns current editor scoll position
public Task GetScrollTop()
GetSelection Gets the current text of the selection in the editor. If nothing is selected (ie. just a cursor) an empty string is returned.
public Task GetSelection()
GetSelectionRange Returns the current selection as a Range Object with row column information.
public Task GetSelectionRange()
GetValue Retrieves the Editor value
public Task GetValue()
GotoBottom Goes to the bottom of the document
public Task GotoBottom()
GotoLine Goes to the specific line in the editor
public Task GotoLine(int line, bool noRefresh, bool noSelection)
HasRedo
public Task HasRedo(object undoManager)
HasUndo
public Task HasUndo(object undoManager)
InitializeInterop Initialize the document
public Task InitializeInterop(string jsonStyle)
IsFocused
public Task IsFocused()
MoveCursorDown
public Task MoveCursorDown(int count)
MoveCursorLeft
public Task MoveCursorLeft(int count)
MoveCursorRight
public Task MoveCursorRight(int count)
MoveCursorUp
public Task MoveCursorUp(int count)
OpenSearch Opens the Editor's Search box and fills in the Search text
public Task OpenSearch(string searchText)
OpenSearchAndReplace Opens the Search and Replace box and fills in the search and replace text
public Task OpenSearchAndReplace(string searchText, string replaceText)
Redo
public Task Redo()
ReplaceContent Replaces the content of the full document with new text using a selection. Preserves the Undo state.
public Task ReplaceContent(string text)
ReplaceSelectionRange
public Task ReplaceSelectionRange(SelectionRange range, string text)
ReplaceSpellCheckRange
public Task ReplaceSpellCheckRange(string jsonRange, string text)
SelectLine Selects the entire line specified by the line number if line is smaller than 0 the current line is selected
public Task SelectLine(int row)
SetCharacterOffSet Sets the cursor posiution to a specific character offset
public Task SetCharacterOffSet(int offset)
SetCodeScrolled
public Task SetCodeScrolled()
SetCursorPosition Sets the cursor position
public Task SetCursorPosition(object pos)
SetEditorStyling Method used to send Configuration to the editor. Sets things like font sizes, Word Wrap, padding etc. Called from Markdown Document. Use instead.
public Task SetEditorStyling(string jsonStyleInfo)
SetFocus
public Task SetFocus()
SetLanguage Sets the language syntax for the document
public Task SetLanguage(string syntax)
SetReadOnly
public Task SetReadOnly(bool show)
SetScrollPosition Sets the vertical scroll position of the document
public Task SetScrollPosition(int top)
SetScrollTop Sets scroll position from a scroll object (captured via COM)
public Task SetScrollTop(object scroll)
SetSelection Sets the value of the current cursor insertion point. Either the cursor position or if selection is active replaces the entire selection with the text passed.
public Task SetSelection(string text)
SetSelectionRange Selects the specified range of characters in the editor using a value from GetSelectionRange
public Task SetSelectionRange(int startRow, int startColumn, int endRow, int endColumn)
SetSelPositionFromMouse Forces the cursor position to be set to the mouse position.
public Task SetSelPositionFromMouse()
SetShowInvisibles
public Task SetShowInvisibles(bool show)
SetShowLineNumbers
public Task SetShowLineNumbers(bool show)
SetValue Set the value of the Editor IMPORTANT: In some instances when a new Tab is opened especially, it may be better to set MarkdownDocument.CurrentText directly, rather than calling this method. Direct…
public Task SetValue(string value, object position, bool keepUndoBuffer)
SetWordWrap
public Task SetWordWrap(bool enable)
ShowGhostText Inserts low lighted text that can be accepted with Tab and cleared with any other key or mouse operation.
public Task ShowGhostText(string text)
ShowSuggestions Forces suggestions to be shown for the currently spell error selected in the editor
public Task ShowSuggestions()
SpellCheckDocument Spellchecks the document explicitly.
public Task SpellCheckDocument(bool force)
Split Sets the editor split mode Beside, Below, None
public Task Split(EditorSplitModes mode)
Undo
public Task Undo()
UpdateDocumentStats Forces the editor to refresh the document statistics. Calls the editor to retrieve the stats and then pushes the changes into the MM shell to update the status bar
public Task UpdateDocumentStats()
IsDirty This is a Write Only property that allows you to update the dirty status inside of the editor. This is not used frequently as the editor IsDirty flag is internally updated but if you need to force…
Namespace: MarkdownMonster.Windows

Assembly: MarkdownMonster.dll