2.3.22 • Published 2 years ago

vue-tiptap-katex v2.3.22

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Vue Tiptap Katex

A rich-text and math editor for Vue.js v2 powered by Tiptap and Mathlive.

For Vue 3 support see vue3-tiptap-katex

Changelog

  • add support for v-model
  • add support for custom table cells

Installation

npm install --save vue-tiptap-katex

Demo

git clone https://github.com/kerasus/vue-tiptap-katex
cd vue-tiptap-katex
npm install
npm run serve

Then you should be able to navigate with your browser and see the demo in http://localhost:8080/

Usage

on <template> add

something like this

<vue-tiptap-katex ref="editor" />

on <script> add

option 1

In the same template file, at <script> part, this will make the component available only to the template in this file

import VueTiptapKatex from 'vue-tiptap-katex'
...
export default {
  ...
  components: {
    VueTiptapKatex,
    ...
  },
  ...
}

option 2

At main Vue configuration, this will make the component available to all templates in your app

import Vue from 'vue'
import VueTiptapKatex from 'vue-tiptap-katex'
...
Vue.component('vue-tiptap-katex', VueTiptapKatex)

How to set and get content

export default {
    ...
    methods: {
        ...
        getContent() {
            const content = this.$refs.editor.getContent()
            console.log(content)
        },
        setContent() {
            const content = "<p>Hellow World!</p>"
            this.$refs.editor.setContent(content)
        },
        ...
    },
    ...
}

Note:

vue-tiptap-katex accepts plain text and HTML as input and exports text as HTML.

Alternative option: v-model:

<vue-tiptap-katex v-model="text" />

Props

Note that all props are optional.

NameTypeDefaultDescription
loadingBooleanfalseLoading overlay
optionsObjectSee Options PropEditor Options

Options Prop

All options are optional:

NameTypeDefaultDescription
bubbleMenuBooleantrueWhether to show Bubble Menu or not
floatingMenuBooleantrueWhether to show Floating Menu or not
poemBooleanfalseWhether to show Poem Button in toolbar or not (This feature is designed for Arabic based languages)
persianKeyboardBooleanfalseAdding Persian keyboard to Mathlive
mathliveOptionsObject{}This Object is passed directly to Mathlive instance
uploadServerObject{}Upload image request config
onResizeEndFunctionnullGets called after resizing image

####uploadServer example: { url: upload.com/image, headers: { Authentication: "token" }, instantUpload: false }

####onResizeEnd: Arguments: url, width, height Return value: url

Example:

onResizeEnd (url, width, height) {
    return url.split('?w=')[0] + '?w=' + width + '&h=' + height
}

Develop and build

npm install
npm run build

Contributors

kerasus, neokazemi

License

MIT editable polyline plugin extension for vue2-leaflet package

2.3.20

2 years ago

2.3.22

2 years ago

2.3.21

2 years ago

2.3.17

2 years ago

2.3.16

2 years ago

2.3.19

2 years ago

2.3.18

2 years ago

2.3.8

2 years ago

2.3.7

2 years ago

2.3.9

2 years ago

2.3.13

2 years ago

2.3.12

2 years ago

2.3.15

2 years ago

2.3.14

2 years ago

2.3.11

2 years ago

2.3.10

2 years ago

2.3.4

2 years ago

2.3.3

2 years ago

2.3.6

2 years ago

2.3.5

2 years ago

2.2.59

2 years ago

2.2.57

2 years ago

2.2.58

2 years ago

2.2.55

2 years ago

2.2.56

2 years ago

2.2.53

2 years ago

2.2.54

2 years ago

2.2.51

2 years ago

2.2.52

2 years ago

2.2.50

2 years ago

2.3.0

2 years ago

2.2.39

2 years ago

2.3.2

2 years ago

2.2.37

2 years ago

2.3.1

2 years ago

2.2.38

2 years ago

2.2.35

2 years ago

2.2.36

2 years ago

2.2.33

2 years ago

2.2.34

2 years ago

2.2.32

2 years ago

2.2.48

2 years ago

2.2.49

2 years ago

2.2.46

2 years ago

2.2.47

2 years ago

2.2.44

2 years ago

2.2.45

2 years ago

2.2.42

2 years ago

2.2.40

2 years ago

2.2.41

2 years ago

2.2.28

2 years ago

2.2.29

2 years ago

2.2.31

2 years ago

2.2.30

2 years ago

2.2.27

2 years ago

2.2.26

3 years ago

2.2.24

3 years ago

2.2.25

3 years ago

2.2.22

3 years ago

2.2.23

3 years ago

2.2.21

3 years ago

2.2.19

3 years ago

2.2.20

3 years ago

2.2.18

3 years ago

2.2.17

3 years ago

2.2.15

3 years ago

2.2.16

3 years ago

2.2.13

3 years ago

2.2.14

3 years ago

2.2.12

3 years ago

2.2.11

3 years ago

2.2.10

3 years ago

2.2.9

3 years ago

2.2.7

3 years ago

2.2.8

3 years ago

2.2.6

3 years ago

2.2.5

3 years ago

2.2.4

3 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.2.3

3 years ago

2.2.2

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.5

3 years ago

2.1.0

3 years ago

2.0.9

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.8

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.9.6

3 years ago

1.9.5

3 years ago

1.9.4

3 years ago

1.9.3

3 years ago

1.9.2

3 years ago

1.9.1

3 years ago