Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@codernote/tree-editor

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codernote/tree-editor

记录软件使用的编辑器,内部使用

npmnpm
Version
1.0.3
Version published
Weekly downloads
12
-80.65%
Maintainers
1
Weekly downloads
 
Created
Source

记录软件 - 树编辑器

记录软件使用的编辑器,内部使用

示例

import TreeEditor from "@codernote/tree-editor";

// root为装载编辑器节点的id
const treeEditor = new TreeEditor("root");

// 加载数据
treeEditor.loadTree(data);

事件

注册监听事

treeEditor.on("fileUpload", (files, callback) => {
  // files为上传的文件,可操作文件上传等异步操作
  // callback为回调
});

treeEditor.on("dataChanged", (data) => {
  // 监听数据变动
});

卸载监听

// cb为注册事件时的监听函数
treeEditor.off("fileUpload", cb);
treeEditor.off("dataChanged", cb);

FAQs

Package last updated on 20 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts