naive-tiptap-sh

0.0.6 • Public • Published

My Awesome Plugin

Welcome to My Awesome Plugin! This plugin is designed to do amazing things.

Installation

You can install this plugin via npm. Make sure you have Node.js and npm installed on your machine.

npm install naive-tiptap-sh

Installation

To use this plugin, simply import it into your project and start using it in your code.

Need to be introduced in main.js

import NaiveTiptap from "naive-tiptap-sh"; //导入

import "../node_modules/naive-tiptap-sh/style.css"; //引入组件样式

createApp(App).use(NaiveTiptap).mount("#app");

Examples

Here are some examples of how to use this plugin in your projects:

Write the code where you need to use it

<NaiveTiptap></NaiveTiptap>

Disposition

The parameter method is provided 提供的参数方法

属性 属性名 类型 默认值 示例 width 宽度 string 100% 如:width="600px"|width="60vw"|width="60%" height 高度 string 600px 如:height="600px"|height="60vh"|height="60%" borderWidth 边框宽度 string 1px 如:borderWidth="2px" borderColor 边框颜色 string #000 如:borderColor="#f00" isSubmitBtn 是否展示编辑器内部保存按钮 Boolean true 如:isSubmitBtn="false" @getContent 点击保存接收内容方法 function ---- 如:@getContent="方法名"提供一个参数接收值(与isSubmitBtn配套使用)

也可在外部定义方法获取编辑器内容 <button @click="getChildContent" style="margin-top: 100px;">调用子组件方法 可通过外部按钮接收编辑器内部的值 组件抛出了 getChildContent() 该方法返回编辑器内容

Package Sidebar

Install

npm i naive-tiptap-sh

Weekly Downloads

4

Version

0.0.6

License

ISC

Unpacked Size

1.44 MB

Total Files

6

Last publish

Collaborators

  • sheng850