
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
element-tiptap-vue3-fixed
Advanced tools
🌸A modern WYSIWYG rich-text editor using tiptap and Element Plus for Vue3
A WYSIWYG rich-text editor using tiptap and Element Plus for Vue3
that's easy to use, friendly to developers, fully extensible and clean in design.
It' s version of alpha tiptap 2.0.1 with fixed bugs and repaire previous functionality. Also deleted most warns in console while using. Also content is reactive now.
English
en
, zh
, pl
, ru
, de
, ko
, es
, zh_tw
, fr
, pt_br
, nl
, he
). welcome to contribute more languagescreate
, transaction
, focus
, blur
, destroy
npm i element-tiptap-vue3-fixed
import { createApp } from 'vue';
import App from './App.vue';
import ElementPlus from 'element-plus';
import ElementTiptapPlugin from 'element-tiptap-vue3-fixed';
// import ElementTiptap's styles
import 'element-tiptap-vue3-fixed/lib/style.css';
const app = createApp(App);
// use ElementPlus's plugin
app.use(ElementPlus);
// use this package's plugin
app.use(ElementTiptapPlugin);
// Now you register `'el-tiptap'` component globally.
app.mount('#app');
Or
<template>
<el-tiptap ...></el-tiptap>
</template>
<script setup>
import { ElementTiptap } from 'element-tiptap-vue3-fixed';
</script>
<template>
<el-tiptap v-model:content="content" :extensions="extensions" />
</template>
<script setup>
import { ref } from 'vue';
import {
// necessary extensions
Doc,
Text,
Paragraph,
//________________________
Heading,
Bold,
Underline,
Italic,
Strike,
BulletList,
OrderedList,
} from 'element-tiptap-vue3-fixed';
// editor extensions
// they will be added to menubar and bubble menu by the order you declare.
const extensions = [
Doc,
Text,
Paragraph,
Heading.configure({ level: 5 }),
Bold.configure({ bubble: true }), // render command-button in bubble menu.
Underline.configure({ bubble: true, menubar: false }), // render command-button in bubble menu but not in menubar.
Italic,
Strike,
BulletList,
OrderedList,
];
// editor's content
const content = ref(`
<h1>Heading</h1>
<p>This Editor is awesome!</p>
`);
</script>
Type: Array
You can use the necessary extensions. The corresponding command-buttons will be added by declaring the order of the extension.
All available extensions:
Doc
Text
Paragraph
Heading
Bold
Italic
Strike
Underline
Link
Image
Iframe
CodeBlock
Blockquote
BulletList
OrderedList
TaskList
TextAlign
Indent
LineHeight
HorizontalRule
HardBreak
History
Table
FormatClear
Color
Highlight
Print
Fullscreen
SelectAll
FontFamily
FontSize
CodeView
You can find all extensions docs here. TODO Correct documentation
You can customize the extension. See Custom extensions. TODO Correct documentation
Type: string
Default: ''
When editor is empty, placeholder will display.
<el-tiptap placeholder="Write something …" />
Type: object
for output json
Default: ''
Type: string
for output html
Default: ''
Editor's content
<el-tiptap :content="content" @onUpdate="onEditorUpdate" />
or Use 'v-model'
<el-tiptap v-model:content="content" />
Type: string
Default: 'html'
Output can be defined to 'html'
or 'json'
.
<el-tiptap output="json" />
further reading: prosemirror data structure
Type: boolean
Default: false
<el-tiptap readonly />
when readonly
is true
, editor is not editable.
Type: boolean
Default: false
<el-tiptap spellcheck> </el-tiptap>
Whether the content is spellcheck enabled.
Type: string | number
A string value with unit or a simple value (the default unit is px
):
<el-tiptap :width="700" height="100%"> </el-tiptap>
The above example will be converted to:
width: 700px;
height: 100%;
Type: boolean
Default: true
Enables or disables the display of the character counter.
Type: boolean
Default: true
Control if tooltips are shown when getting with mouse over the buttons from the toolbar.
Specifies the editor i18n language.
<template>
<el-tiptap :lang="en"></el-tiptap>
</template>
<script setup>
import { ElementTiptap } from 'element-tiptap-vue3-fixed';
import en from 'element-tiptap-vue3-fixed/lib/locales/en';
</script>
Available languages:
en
(default)zh
pl
by @FurtakMru
by @baitkulde
by @Thesicstarko
by @Hotbrainses
by @koaszh_tw
by @eric0324fr
by @LPABelgiumpt_br
by @valterleonardonl
by @Arne-Janhe
by @shovalPMSWelcome contribution.
<template>
<el-tiptap @onCreate="onCreate" />
</template>
<script setup>
/**
* the tiptap editor instance
* see https://tiptap.dev/api/editor
*/
const onCreate = ({ editor }) => {
// ...
};
</script>
The same as onCreate
Please see CONTRIBUTING for details.
FAQs
🌸A modern WYSIWYG rich-text editor using tiptap and Element Plus for Vue3
The npm package element-tiptap-vue3-fixed receives a total of 229 weekly downloads. As such, element-tiptap-vue3-fixed popularity was classified as not popular.
We found that element-tiptap-vue3-fixed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.