Muya originated from MarkText, which was originally used in the MarkText and provides Markdown editing support for MarkText. Today, Muya is available as a stand-alone library that provides an efficient Markdown editing experience for many web browser applications.
npm install @muyajs/core
import {
CodeBlockLanguageSelector,
EmojiSelector,
ImageResizeBar,
ImageToolBar,
InlineFormatToolbar,
MarkdownToHtml,
Muya,
ParagraphFrontButton,
ParagraphFrontMenu,
ParagraphQuickInsertMenu,
PreviewToolBar,
TableColumnToolbar,
TableDragBar,
TableRowColumMenu,
zh,
} from '@muyajs/core';
Muya.use(EmojiSelector);
Muya.use(InlineFormatToolbar);
Muya.use(ImageToolBar);
Muya.use(ImageResizeBar);
Muya.use(CodeBlockLanguageSelector);
Muya.use(ParagraphFrontButton);
Muya.use(ParagraphFrontMenu);
Muya.use(TableColumnToolbar);
Muya.use(ParagraphQuickInsertMenu);
Muya.use(TableDragBar);
Muya.use(TableRowColumMenu);
Muya.use(PreviewToolBar);
import '@muyajs/core/lib/style.css';
const container = document.querySelector('#editor');
const muya = new Muya(container, {
markdown: 'Hello world',
});
muya.locale(zh);
muya.init();
There is also an example of how to use muya in Typescript.
Coming soon!!!
# step1: install dependencies
pnpm install
# step2: run the development codes
pnpm run dev
pnpm build
# update version numbers.
pnpm run release
# publish to npm.
pnpm -r publish
❓ What is the relationship between MarkText and Muya?
Muya is derived from MarkText. Our team believes that Muya should not be limited to desktop applications. It should also run in a web browser, so we have done some compatibility with browsers and Electron applications, so that Muya can leave Electron Apps and can run into different browser environments.
❓What is the relationship between MarkText's version and the Muya's version?
None!
-
MarkText - Next generation markdown editor, running on platforms of MacOS Windows and Linux.
-
MindBox - A note-taking app that perfectly supports markdown syntax.
MIT © Jocs