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

@vavt/md-editor-extension

v3.0.0

Published

Extensions for md-editor-rt and md-editor-v3.

Downloads

1,542

Readme

md-editor-extension

English | 中文

Share your configuration of md-editor-v3 and md-editor-rt.

Language

| name | description | author | | ----- | ---------------------- | -------------------------------------------- | | zh_TW | Chinese ( Traditional) | @imzbf | | fr_FR | French | @tofandel | | jp_JP | Japanese | @xj89959853 |

PreviewTheme

| name | description | author | | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | | arknights | From juejin-markdown-theme-arknights, author: @viewweiwu | @imzbf |

Usage

md-editor-v3

  1. Install
yarn add md-editor-v3 @vavt/md-editor-extension
  1. Config
<template>
  <md-editor language="zh-TW" preview-theme="arknights" />
</template>

<script setup>
import MdEditor from 'md-editor-v3';
// import theme css
import '@vavt/md-editor-extension/dist/previewTheme/arknights.css';
// import existing language
import ZH_TW from '@vavt/md-editor-extension/dist/locale/zh-TW';

MdEditor.config({
  editorConfig: {
    languageUserDefined: {
      'zh-TW': ZH_TW,
    },
  },
});
</script>

md-editor-rt

  1. Install
yarn add md-editor-rt @vavt/md-editor-extension
  1. Config
import React from 'react';
import MdEditor from 'md-editor-rt';
// import existing theme
import '@vavt/md-editor-extension/dist/previewTheme/arknights.css';
// import existing language
import ZH_TW from '@vavt/md-editor-extension/dist/locale/zh-TW';

MdEditor.config({
  editorConfig: {
    languageUserDefined: {
      'zh-TW': ZH_TW,
    },
  },
});

export default () => {
  return <MdEditor language="zh-TW" previewTheme="arknights" />;
};

Contribute

  • Fork the repository.
  • Write code based on existing templates.
  • Submit a pull request to the project owner.

Please note that the development environment has automatically introduced your language configuration and theme. You do not need to manually reference it in the 'dev' directory. Regardless of the production or development environment, you only need to pay attention to the content of the language configuration and theme itself.

Language

Create a file named as [language name].js, and export in the following template.

import type { StaticTextDefaultValue } from '../../index';

/**
 * @author imzbf
 * @email  [email protected]
 * @github https://github.com/imzbf
 *
 * English
 */
const EN_US: StaticTextDefaultValue = {
  toolbarTips: {
    bold: 'bold',
    underline: 'underline',
    italic: 'italic',
    strikeThrough: 'strikeThrough',
    title: 'title',
    sub: 'subscript',
    sup: 'superscript',
    quote: 'quote',
    unorderedList: 'unordered list',
    orderedList: 'ordered list',
    task: 'task list',
    codeRow: 'inline code',
    code: 'block-level code',
    link: 'link',
    image: 'image',
    table: 'table',
    mermaid: 'mermaid',
    katex: 'formula',
    revoke: 'revoke',
    next: 'undo revoke',
    save: 'save',
    prettier: 'prettier',
    pageFullscreen: 'fullscreen in page',
    fullscreen: 'fullscreen',
    preview: 'preview',
    htmlPreview: 'html preview',
    catalog: 'catalog',
    github: 'source code',
  },
  titleItem: {
    h1: 'Lv1 Heading',
    h2: 'Lv2 Heading',
    h3: 'Lv3 Heading',
    h4: 'Lv4 Heading',
    h5: 'Lv5 Heading',
    h6: 'Lv6 Heading',
  },
  imgTitleItem: {
    link: 'Add Img Link',
    upload: 'Upload Img',
    clip2upload: 'Clip Upload',
  },
  linkModalTips: {
    title: 'Add ',
    descLabel: 'Desc:',
    descLabelPlaceHolder: 'Enter a description...',
    urlLabel: 'Link:',
    urlLabelPlaceHolder: 'Enter a link...',
    buttonOK: 'OK',
  },
  clipModalTips: {
    title: 'Crop Image',
    buttonUpload: 'Upload',
  },
  copyCode: {
    text: 'Copy',
    successTips: 'Copied!',
    failTips: 'Copy failed!',
  },
  mermaid: {
    flow: 'flow',
    sequence: 'sequence',
    gantt: 'gantt',
    class: 'class',
    state: 'state',
    pie: 'pie',
    relationship: 'relationship',
    journey: 'journey',
  },
  katex: {
    inline: 'inline',
    block: 'block',
  },
  footer: {
    markdownTotal: 'Word Count',
    scrollAuto: 'Scroll Auto',
  },
};

export default EN_US;

PreviewTheme

Create a file named as [theme name].scss, then write your theme code:

@import '../../common/index.scss';

.xxx-theme {
  @include common-style;
  color: red;
}

xxx is the name of your theme, use like previewTheme="xxx".

You can make full use of the existing css variables to generate your theme.