首页
话题
消息
手册
我的
返回介绍

tinymce-Annotator

发布于 2019-05-06 字数2352 浏览 781 评论 0

Methods

name summary defined by
annotate() Applies the annotation at the current selection using data tinymce.Annotator
annotationChanged() Executes the specified callback when the current selection matches the annotation or not. tinymce.Annotator
getAll() Retrieve all the annotations for a given name tinymce.Annotator
register() Registers a specific annotator by name tinymce.Annotator

Methods

annotate

annotate(name:String, data:Object)

Applies the annotation at the current selection using data

Parameters
  • name (String) – the name of the annotation to apply
  • data (Object) – information to pass through to this particular annotation

annotationChanged

annotationChanged(name:String, callback:function)

Executes the specified callback when the current selection matches the annotation or not.

Parameters
  • name (String) – Name of annotation to listen for
  • callback (function) – Calback with (state, name, and data) fired when the annotation at the cursor changes. If state if false, data will not be provided.

getAll

getAll(name:String):Object

Retrieve all the annotations for a given name

Parameters
  • name (String) – the name of the annotations to retrieve
Return value
  • Object – an index of annotations from uid => DOM nodes

register

register(name:String, settings:Object)

Registers a specific annotator by name

Parameters
  • name (String) – the name of the annotation
  • settings (Object) – settings for the annotation (e.g. decorate)

Can’t find what you’re looking for? Let us know.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.

您暂时不能评论!

管理员开启了需要登录才能够评论,你可以免费注册一个本站的账号。

还没有评论!

目前还没有任何评论,快来抢沙发吧!