C# 클래스 Emmet.Engine.EmmetEditorCallbacks

Implementation of IEmmetEditor interface for JavaScript engine. See https://github.com/emmetio/emmet/blob/master/lib/interfaces/IEmmetEditor.js for details.
파일 보기 프로젝트 열기: sergey-rybalkin/emmet.net 1 사용 예제들

공개 메소드들

메소드 설명
Attach ( IEmmetEditor editor ) : bool

Attaches this instance to the given code editor.

CreateSelection ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Creates selection from start to end character indexes. If end is omitted, this method should place caret and start index.

Detach ( ) : void

Detaches this instance from the editor window, cleans up any internal caches.

GetCarretPos ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns current caret position.

GetContent ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callbacks. Returns the content of the current editor window.

GetCurrentLine ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns the content of the current line.

GetCurrentLineRange ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns current line's start and end indexes as object with start and end properties.

GetFilePath ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns current editor's file path.

GetProfileName ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns current output profile name (see profile module). In most cases, this method should return null and let Emmet guess best profile name for current syntax and user data. In case you’re using advanced editor with access to syntax scopes (like Sublime Text 2), you can return syntax name for current scope. For example, you may return `line` profile when editor caret is inside string of programming language.

GetSelection ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns current selection.

GetSelectionRange ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns character indexes of selected text: object with start and end properties.If there's no selection, should return object with start and end properties referring to current caret position.

GetSyntax ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns current editor's syntax mode.

Prompt ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Asks user to enter something.

ReplaceContent ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Replace editor's content or it's part (from start to end index). If value contains caret_placeholder, the editor will put caret into this position. If you skip start and end arguments, the whole target's content will be replaced with value. If you pass start argument only, the value will be placed at start string index of current content. If you pass start and end arguments, the corresponding substring of current target's content will be replaced with value.

SetCarretPos ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Set new caret position.

메소드 상세

Attach() 공개 메소드

Attaches this instance to the given code editor.
public Attach ( IEmmetEditor editor ) : bool
editor IEmmetEditor Editor to attach to.
리턴 bool

CreateSelection() 공개 메소드

JavaScript callback. Creates selection from start to end character indexes. If end is omitted, this method should place caret and start index.
public CreateSelection ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
리턴 InternalHandle

Detach() 공개 메소드

Detaches this instance from the editor window, cleans up any internal caches.
public Detach ( ) : void
리턴 void

GetCarretPos() 공개 메소드

JavaScript callback. Returns current caret position.
public GetCarretPos ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
리턴 InternalHandle

GetContent() 공개 메소드

JavaScript callbacks. Returns the content of the current editor window.
public GetContent ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
리턴 InternalHandle

GetCurrentLine() 공개 메소드

JavaScript callback. Returns the content of the current line.
public GetCurrentLine ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
리턴 InternalHandle

GetCurrentLineRange() 공개 메소드

JavaScript callback. Returns current line's start and end indexes as object with start and end properties.
public GetCurrentLineRange ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
리턴 InternalHandle

GetFilePath() 공개 메소드

JavaScript callback. Returns current editor's file path.
public GetFilePath ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
리턴 InternalHandle

GetProfileName() 공개 메소드

JavaScript callback. Returns current output profile name (see profile module). In most cases, this method should return null and let Emmet guess best profile name for current syntax and user data. In case you’re using advanced editor with access to syntax scopes (like Sublime Text 2), you can return syntax name for current scope. For example, you may return `line` profile when editor caret is inside string of programming language.
public GetProfileName ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
리턴 InternalHandle

GetSelection() 공개 메소드

JavaScript callback. Returns current selection.
public GetSelection ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
리턴 InternalHandle

GetSelectionRange() 공개 메소드

JavaScript callback. Returns character indexes of selected text: object with start and end properties.If there's no selection, should return object with start and end properties referring to current caret position.
public GetSelectionRange ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
리턴 InternalHandle

GetSyntax() 공개 메소드

JavaScript callback. Returns current editor's syntax mode.
public GetSyntax ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
리턴 InternalHandle

Prompt() 공개 메소드

JavaScript callback. Asks user to enter something.
public Prompt ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
리턴 InternalHandle

ReplaceContent() 공개 메소드

JavaScript callback. Replace editor's content or it's part (from start to end index). If value contains caret_placeholder, the editor will put caret into this position. If you skip start and end arguments, the whole target's content will be replaced with value. If you pass start argument only, the value will be placed at start string index of current content. If you pass start and end arguments, the corresponding substring of current target's content will be replaced with value.
public ReplaceContent ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
리턴 InternalHandle

SetCarretPos() 공개 메소드

JavaScript callback. Set new caret position.
public SetCarretPos ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
리턴 InternalHandle