npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mirus/tiptap-editor

v3.0.3

Published

custom setup for the tiptap editor

Downloads

479

Readme

For Vue.js 3.0 use version 3.X. All active development happens here. For Vue 2 use version 2.X. This version will recieve no more updates. How convenient!

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:

      [
          {
              value: 'the',
              message: 'did you mean...',
              options: ['too', 'pizza'], // optional
          },
          {
              value: 'test text',
              message: 'cannot say that, sorry',
              overrideClass: 'underlined-green', // optional
              offset: 32, // optional
              length: 9, // optional
          },
      ];
    • Optional offset and length values can be specified to highlight a specific instance of an error.

      • offset: Number - character distance from beginning of the text to the index of the error
      • length: Number - character length of the error
  • 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