
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
canvas-editor-toolbar
Advanced tools
一个基于@hufe921/canvas-editor的富文本编辑器工具栏组件,为Vue 3应用提供丰富的文本编辑功能。
npm install canvas-editor-toolbar
<template>
<div class="editor-container">
<EditorToolbar :editor="editor" @save="handleSave" />
<div ref="editorContainer"></div>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import CanvasEditor from '@hufe921/canvas-editor'
import { EditorToolbar } from 'canvas-editor-toolbar'
const editorContainer = ref(null)
const editor = ref(null)
onMounted(() => {
if (editorContainer.value) {
editor.value = new CanvasEditor(
editorContainer.value,
{ main: [] },
{
defaultType: 'canvas',
defaultFont: 'Microsoft YaHei',
defaultSize: 16
}
)
}
})
const handleSave = (content) => {
console.log('保存内容:', content)
// 处理保存逻辑
}
</script>
属性名 | 类型 | 说明 |
---|---|---|
editor | Editor | Canvas Editor实例,必须传入 |
事件名 | 参数 | 说明 |
---|---|---|
save | content | 当用户点击保存按钮时触发,返回编辑器内容 |
MIT
FAQs
一个基于canvas-editor的富文本编辑器工具栏组件
The npm package canvas-editor-toolbar receives a total of 2 weekly downloads. As such, canvas-editor-toolbar popularity was classified as not popular.
We found that canvas-editor-toolbar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.