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 🙏

© 2025 – Pkg Stats / Ryan Hefner

vue-jeditor

v0.1.2

Published

A Markdown editor for the Vue framework

Readme

vue-jeditor

A Markdown editor for the Vue framework

How use

install

npm install vue-jeditor

Introduced the global

//index.js
import Vue from "vue";

import JEditor from "vue-jeditor";
import "vue-jeditor/dist/src/css/style.css";
Vue.use(JEditor);

//demo.vue
<JEditor v-model="value"></JEditor>;
new Vue({
	data() {
		return { value: "" };
	},
});

Introduce in a separate page

//demo.vue
import JEditor from "vue-jeditor";
import "vue-jeditor/dist/src/css/style.css";
components: {
    JEditor,
},
<JEditor v-model="value"></JEditor>
new Vue({
    data() {
       return { value: '' }
    }
})

API

props

| name | type | default | describe | | ------------------ | -------- | ----------------- | -------------------------------------------------------------------------- | | value | String | "" | value | | fontSize | String | 14px | font size | | preview | Boolean | true | Whether the preview area is enabled | | fullscreen | Boolean | true | Whether to enable full screen editing | | htmlcode | Boolean | true | Whether you can view HTML text | | imageUoload | Function | null | Image upload custom method | | fileName | String | file | Upload file field name | | fileData | Bbject | {} | Additional parameters that come with uploading | | i18n | String | en | zh-cn: Simplified Chinese, en: English | | color | Bbject | | Font color set | | toolbarsBackground | String | #ffffff | Toolbar background colors | editorBackground | String | #ffffff | Edit bar background color | | previewBackground | String | #fbfbfb | Preview bar background color | | imageComplete | Function | | Override the image button method, which will not show the drop-down option | | action | String | / | File upload address | | headers | Object | {} | upload header | | tabSize | Number | 4 | tab size | | on-success | Function | | upload success callback | | on-progress | Function | | upload progress callback | | on-error | Function | | upload error callback | | save | Function | | Save method, CRTL + S triggered | | hljs | Object | {} | highlight object | | languages | Object | {} | highlight languages object | | toolbars | Object | All on by default | Toolbar options |

Toolbar options

toolbars: {
    bold: true,
    italic: true,
    header: true,
    underline: true,
    strikethrough: true,
    mark: true,
    quote: true,
    ol: true,
    ul: true,
    link: true,
    color: true,
    imagelink: true,
    code: true,
    table: true,
    save: true,
    fullscreen: true,
    htmlcode: true,
    preview: true,
},

Code highlighting

Because the file size is optimized, the VUe-JEditor does not turn on code highlighting by default, or manually if it is needed

According to the need to introduce

import hljs from "highlight.js/lib/core";
import css from "highlight.js/lib/languages/css";
import javascript from "highlight.js/lib/languages/javascript";
import "./src/css/monokai-sublime.css";
new Vue({
	data() {
		return {
			content: text,
			hljs: hljs,
			languages: {
				css,
				javascript,
			},
		};
	},
});
<JEditor v-model="content" :hljs="hljs" :languages="languages" />

Introduced the global

import hljs from "highlight.js/lib/core";
import css from "highlight.js/lib/languages/css";
import javascript from "highlight.js/lib/languages/javascript";
import "./src/css/monokai-sublime.css";
Vue.use(JEditor, { hljs, languages: { javascript, css } });

The introduced monokai-sublime.css file is the highlight theme style file, and you can go to https://highlightjs.org/ to see your favorite themes.