Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@vavt/md-editor-extension
Advanced tools
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 |
yarn add md-editor-v3 @vavt/md-editor-extension
<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>
yarn add md-editor-rt @vavt/md-editor-extension
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" />;
};
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.
Create a file named as [language name].js
, and export in the following template.
import type { StaticTextDefaultValue } from '../../index';
/**
* @author imzbf
* @email zbfcqtl@gmail.com
* @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;
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.
FAQs
Extensions for md-editor-rt and md-editor-v3.
The npm package @vavt/md-editor-extension receives a total of 206 weekly downloads. As such, @vavt/md-editor-extension popularity was classified as not popular.
We found that @vavt/md-editor-extension demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.