Class AceEditorInterop

Wrapper around the Ace Editor JavaScript COM interface that allows calling into the editor to perform various operations

System.Object
  MarkdownMonster.BaseBrowserInterop
    MarkdownMonster.AceEditorInterop
public class AceEditorInterop : BaseBrowserInterop

Class Members

MemberDescription

Constructor

AdjustPadding

public void AdjustPadding(bool forceRefresh)

DeleteCurrentLine

public void DeleteCurrentLine()

EnableSpellChecking

public void EnableSpellChecking(bool enable,     string dictionary)

ExecCommand

Execute an ACE Editor Command with an optional parameter

public void ExecCommand(string action,     string parm)

FindAndReplaceText

public void FindAndReplaceText(string search,     string replace)

FindAndReplaceTextInCurrentLine

public void FindAndReplaceTextInCurrentLine(string search,     string replace)

FindText

Finds first match and displays it in the editor

public void FindText(string search)

GetCurrentLine

Returns the text of the currently active line in the editor

public string GetCurrentLine()

GetCursorPosition

Returns the current cursor position as an object

public object GetCursorPosition()

GetFontSize

Returns a font object

public object 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 styling in setEditorStyle and also with a few additional settings.

public static string GetJsonStyleInfo()

GetLine

Returns the text of the currently active line in the editor

public string GetLine(int row)

GetLineNumber

public int GetLineNumber()

GetScrollTop

Returns current editor scoll position

public object GetScrollTop()

GetSelection

public string GetSelection()

GetSelectionRange

public SelectionRange GetSelectionRange()

GetUndoManager

Returns the JavaScript UndoManager

public object GetUndoManager()

GetValue

Retrieves the Editor value

public string GetValue()

GotoBottom

Goes to the bottom of the editor

public void GotoBottom()

public void GotoBottom(bool noRefresh,     bool noSelection)

GotoLine

Goes to the specific line in the editor

public void GotoLine(int line,     bool noRefresh,     bool noSelection)

HasRedo

public bool HasRedo(object undoManager)

HasUndo

public bool HasUndo(object undoManager)

MoveCursorDown

public void MoveCursorDown(int count)

MoveCursorLeft

public void MoveCursorLeft(int count)

MoveCursorRight

public void MoveCursorRight(int count)

MoveCursorUp

public void MoveCursorUp(int count)

OpenSearch

Opens the Editor's Search box and fills in the Search text

public void OpenSearch(string searchText)

OpenSearchAndReplace

Opens the Search and Replace box and fills in the search and replace text

public void OpenSearchAndReplace(string searchText,     string replaceText)

Redo

public void Redo()

ReplaceContent

public void ReplaceContent(string text)

SetCodeScrolled

public void SetCodeScrolled()

SetCursorPosition

Sets the cursor position

public void SetCursorPosition(object pos)

public void SetCursorPosition(int row,     int col)

SetEditorStyling

Method used to send Configuration to the editor. Sets things like font sizes, Word Wrap, padding etc. Called from Markdown Document.

Use MarkdownMonster.MarkdownDocumentEditor.RestyleEditor(System.Boolean,System.Boolean) instead.

public void SetEditorStyling()

SetFocus

public void SetFocus()

SetLanguage

Sets the language syntax for the document

public void SetLanguage(string syntax)

SetReadOnly

public void SetReadOnly(bool show)

SetScrollTop

Sets scroll position from a scroll object (captured via COM)

public void SetScrollTop(object scroll)

SetSelection

public void SetSelection(string text)

SetSelectionRange

public void SetSelectionRange(int startRow,     int startColumn,     int endRow,     int endColumn)

SetSelPositionFromMouse

Forces the cursor position to be set to the mouse position.

public void SetSelPositionFromMouse()

SetShowInvisibles

public void SetShowInvisibles(bool show)

SetShowLineNumbers

public void SetShowLineNumbers(bool show)

SetValue

Set the value of the Editor

public void SetValue(string value,     object position,     bool keepUndoBuffer)

SetWordWrap

public void SetWordWrap(bool enable)

ShowSuggestions

Forces suggestions to be shown for the currently spell error selected in the editor

public void ShowSuggestions()

SpellCheckDocument

Spellchecks the document explicitly.

public void SpellCheckDocument(bool force)

Split

Sets the editor split mode - Beside, Below, None

public void Split(string location)

Undo

public void Undo()

UpdateDocumentStats

public void 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 some action in the editor (like a spellcheck) to fire then this is the property to set.

Requirements

Namespace: MarkdownMonster
Assembly: markdownmonster.exe

© West Wind Technologies, 1996-2021 • Updated: 02/14/20
Comment or report problem with topic