2.0.0 • Published 8 months ago

tiptap-editor v2.0.0

Weekly downloads
27
License
MIT
Repository
github
Last release
8 months ago

tiptap-editor

Vue component that contains our custom setup for the tiptap editor. Able to highlight phrases and give reasons/fixes to the warnings

npm i tiptap-editor
yarn add tiptap-editor

example image

<template>
  <TextEditor
	:value.sync="localtext"
	:warnings="warnings"
	:showMenu="true"
	:maxCharacterCount="200"
	height="500px"
	placeholder="write something will-ya!"
	id="some_unique_id"
  />
</template

<script>
import tiptapEditor from './tiptap-editor.vue';

export default {
	components: { tiptapEditor },
	data() {
		return {
			warnings: [],
			value: 'this is the initial value'
		}
	}
}

</script>

Props

  • value: String - the text to edit

  • placeholder: String - the text to display when there is nothing in the editor

  • warnings: [ Objects ] - an array of text that should be warned about

    	- example:
    		```js
    		[
    			{
    				value: 'the',
    				message: 'did you mean...',
    				options: ['too', 'pizza'], // optional
    			},
    			{
    				value: 'test text',
    				message: 'cannot say that, sorry',
    				overrideClass: 'underlined-green', // optional
    			},
    		]
    		```
  • maxCharacterCount: Number - Show a count of the current number of characters. If over the max the count will show red

  • height: String - height of the text editor, default is 300px

  • showMenu: Boolean - if false, hide the format menu

  • id: String - give the editor a unique id. Also adds aria tags to link the editor menu to the text area

Events

  • update:value - emitted whenever the core text value changes

  • new-character-count - the new internal character count of the value. This is useful since the synced value may have formatting, which internal is ignored when counting characters.

Setup

  • clone this repo
  • cd into the repo directory and run yarn install
  • run yarn serve

Available Scripts

  • yarn serve - start the dev server
  • yarn build - build for production
  • yarn preview - locally preview production build
  • yarn format - run Prettier to format code
  • yarn validate:format - run Prettier with --check flag
  • yarn test - run tests using vitest
2.0.0

8 months ago

1.5.0

1 year ago

1.4.10

1 year ago

1.4.9

1 year ago

1.4.8

1 year ago

1.4.7

2 years ago

1.4.6

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

4 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.13

5 years ago

1.1.12

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.38

5 years ago

1.0.37

5 years ago

1.0.36

5 years ago

1.0.35

5 years ago

1.0.34

5 years ago

1.0.33

5 years ago

1.0.32

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.29

5 years ago

1.0.28

5 years ago