0.1.1 • Published 1 year ago

markdown-it-tabbar v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

markdown-it-tabbar

npm version License

A markdown-it plugin to group anything using tabbar.

Features

npm.io

::: tabbar

@ py
``` python
print("Hello World!")
```

@ java
``` java
System.out.println("Hello World!");
```

:::

Usage

We supply plugin, style and script for you to use.

Install

npm i markdown-it-tabbar

Options

import MarkdownIt from 'markdown-it'
import MarkdownItTabbar from 'markdown-it-tabbar'

const md = new MarkdownIt()
md.use(MarkdownItTabbar, {
  // if conditions below are not satisfied, the plugin will not work
  // the options below are also the default options
  // contianerMark, length === 1
  mark: ':',
  // containerMarkRepeatMin, >= 1
  min: 3,
  // titleMark, just repeat once is enough
  title: '@',
  // containerName, length >= 1
  name: 'tabbar'
})

Script

You should run this script in your html file. As an example, you can run it after mounting components in Vue 3.

<script setup lang="ts">
import { useTabbar } from 'markdown-it-tabbar'
import { onMounted } from 'vue'

onMounted(() => {
  useTabbar()
})
</script>

Style

We supply a default styles for you to use.

import 'markdown-it-tabbar/styles/base.css'

You can also customize the style. See base.css for reference.

0.1.1

1 year ago

0.1.0

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago