@@ -80,6 +80,7 @@
* [open issues](https://github.com/Vanessa219/vditor/issues)
* [346](https://github.com/Vanessa219/vditor/issues/346) 内容主题推荐(长期有效) `改进功能`
+* [721](https://github.com/Vanessa219/vditor/issues/721) 所见即所得模式加入划词评论 `引入特性`
### v3.6.1 / 2020-10-xx
@@ -357,6 +357,21 @@ class Vditor extends VditorMethod {
document.getElementById("vditorIconScript").remove();
this.clearCache();
}
+
+ /** 获取评论 ID */
+ public getCommentIds() {
+ return [""];
+ }
+ /** 高亮评论 */
+ public hlCommentIds(ids: string[]) {
+ /** 评论之后文字添加下划线样式 */
+ public afterCommentId(id: string) {
export default Vditor;
@@ -504,6 +504,11 @@ interface IOptions {
hide?: boolean,
pin?: boolean,
};
+ /** 评论 */
+ comment?: {
+ add(id: string): void
+ remove(ids: string[]): void;
+ };
/** 主题。默认值: 'classic' */
theme?: "classic" | "dark";
/** 图标。默认值: 'ant' */