GithubHelp home page GithubHelp logo

skadid / ez-tiptap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from moosin76/ez-tiptap

1.0 0.0 0.0 13.96 MB

vue, vuetify, tiptap Rich Text Editor

JavaScript 28.62% Vue 48.64% CSS 21.66% HTML 1.07%

ez-tiptap's Introduction

Ezcode Tiptap Editor

The editor is based on tiptap 2.0 beta. You need to install vue.js 2 and vuetify.

DEMOPAGE

Install

npm i @ezvue/ez-tiptap-editor
yarn add @ezvue/ez-tiptap-editor

Add Component

import Vue  from "vue";
import EzTiptap from "@ezvue/ez-tiptap-editor";
import "@ezvue/ez-tiptap-editor/dist/ez-tiptap.min.css";
Vue.component("EzTiptap", EzTiptap);

USE Editor

<ez-tiptap :editable="true" v-model="contents" @uploadImage="uploadImage"/>
  • editable : Whether to edit the content
  • v-model : Link content to v-model
  • @uploadImage : Specifies the function to upload to the server

Image Upload

The object is passed file, desc and callback function. After uploading the file, pass the url of the file as an argument to the callback function.

async uploadImage({file, desc, callback}) {
	const formData = new FormData();
	formData.append("upFile", file);
	formData.append("bf_desc", desc);
	const data = await this.$axios.post(
		`/api/url`,
		formData
	);
	callback(`/data.url`);
},

ez-tiptap's People

Contributors

moosin76 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.