wechat/editor
editor module provides EditorContext API bindings details in wechat document
Types
EditorContext type for rich text editor
pub type EditorContext
Values
pub fn create_editor_context(
component c: object.JsObject,
) -> EditorContext
wx.createEditorContext
Create editor context
pub fn editor_context_blur(ctx: EditorContext) -> Nil
EditorContext.blur Remove focus from editor
pub fn editor_context_clear(
ctx: EditorContext,
complete cb: fn() -> Nil,
) -> promise.Promise(Result(object.JsObject, object.WechatError))
EditorContext.clear Clear editor contents
pub fn editor_context_focus(ctx: EditorContext) -> Nil
EditorContext.focus Set focus to editor
pub fn editor_context_format(
ctx: EditorContext,
name n: String,
value v: String,
) -> Nil
EditorContext.format Format selected text
pub fn editor_context_get_contents(
ctx: EditorContext,
complete cb: fn() -> Nil,
) -> promise.Promise(Result(object.JsObject, object.WechatError))
EditorContext.getContents Get editor contents
pub fn editor_context_get_selection_text(
ctx: EditorContext,
complete cb: fn() -> Nil,
) -> promise.Promise(Result(object.JsObject, object.WechatError))
EditorContext.setContents Get selection info
pub fn editor_context_insert_text(
ctx: EditorContext,
text t: String,
) -> Nil
EditorContext.insertText Insert text at cursor position
pub fn editor_context_ready(
ctx: EditorContext,
complete cb: fn() -> Nil,
) -> promise.Promise(Result(object.JsObject, object.WechatError))
EditorContext.ready Check if editor is ready
pub fn editor_context_scroll_into_view(ctx: EditorContext) -> Nil
EditorContext.scrollIntoView Scroll editor into view
pub fn editor_context_set_contents(
ctx: EditorContext,
contents: object.JsObject,
complete cb: fn() -> Nil,
) -> promise.Promise(Result(object.JsObject, object.WechatError))
EditorContext.setContents Set editor contents
pub fn editor_context_status(
ctx: EditorContext,
complete cb: fn() -> Nil,
) -> promise.Promise(Result(object.JsObject, object.WechatError))
EditorContext.status Get editor status