Skip to content

Commit

Permalink
Merge branch 'v5' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
imzbf committed Oct 24, 2024
2 parents a4951f2 + c9dbf75 commit c01a131
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 15 deletions.
1 change: 0 additions & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ const scrollElement = document.documentElement;
| codeTheme | `'atom' \| 'a11y' \| 'github' \| 'gradient' \| 'kimbie' \| 'paraiso' \| 'qtcreator' \| 'stackoverflow'` | 'atom' | 代码块 highlight 样式名称,扩展更多见下方 |
| mdHeadingId | `(text: string, level: number, index: number) => string` | (text) => text | 标题`ID`计算方式 |
| sanitize | `(html: string) => string` | (html) => html | 通过该属性修改编译后的html内容 |
| noIconfont | `boolean` | false | 不插入 iconfont 链接,你可以在[这里](https://imzbf.github.io/md-editor-v3/zh-CN/docs#%F0%9F%A4%9E%F0%9F%8F%BC%20noIconfont)获取最新链接 |
| formatCopiedText | `(text: string) => string` | (text: string) => text | 格式化复制代码 |
| codeStyleReverse | `boolean` | true | 代码块为暗色背景的预览主题,将代码风格设置为暗色风格 |
| codeStyleReverseList | `Array<string>` | ['default', 'mk-cute'] | 代码块为暗色背景的预览主题 |
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ Inputing prompt and mark, emoji extensions
| codeTheme | `'atom' \| 'a11y' \| 'github' \| 'gradient' \| 'kimbie' \| 'paraiso' \| 'qtcreator' \| 'stackoverflow'` | 'atom' | Highlight code style, can be customized also |
| mdHeadingId | `(text: string, level: number, index: number) => string` | (text) => text | H1-H6 `ID` generator |
| sanitize | `(html: string) => string` | (html) => html | This attribute is used to alter the compiled HTML content |
| noIconfont | `boolean` | false | Not append iconfont script, you can get the latest link [here](https://imzbf.github.io/md-editor-v3/en-US/docs#%F0%9F%A4%9E%F0%9F%8F%BC%20noIconfont) |
| formatCopiedText | `(text: string) => string` | (text: string) => text | Format copied code |
| codeStyleReverse | `boolean` | true | Code style will be reversed to dark while code block of the theme has a dark background |
| codeStyleReverseList | `Array<string>` | ['default', 'mk-cute'] | Themes to be reversed |
Expand Down
1 change: 0 additions & 1 deletion dev/Preview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ export default defineComponent({
mdHeadingId={mdHeadingId}
// sanitize={(h) => `<a href="#">aaa</a>${h}`}
// scrollAuto={false}
// noIconfont
// codeStyleReverse={false}
// codeStyleReverseList={['mk-cute']}
// autoFocus
Expand Down
4 changes: 2 additions & 2 deletions example/electron/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
import { ref } from 'vue';
import { MdEditor } from 'md-editor-v3';
import data from './data.md'
import data from './data.md';
import 'md-editor-v3/lib/style.css';
const text = ref(data);
</script>

<template>
<MdEditor v-model="text" noIconfont pageFullscreen />
<MdEditor v-model="text" pageFullscreen />
</template>
2 changes: 1 addition & 1 deletion packages/MdCatalog/MdCatalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const MdCatalog = defineComponent({
if (props.onActive) {
props.onActive(tocItem, ele);
} else {
ctx.emit('onActive', tocItem);
ctx.emit('onActive', tocItem, ele);
}
};

Expand Down
9 changes: 0 additions & 9 deletions packages/MdEditor/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,6 @@ export const mdPreviewProps = {
type: String as PropType<string>,
default: 'atom'
},
/**
* 不插入iconfont链接
*
* @default false
*/
noIconfont: {
type: Boolean as PropType<boolean>,
default: undefined
},
/**
* 复制代码格式化方法
*
Expand Down
1 change: 1 addition & 0 deletions scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { buildType } from './build.type';
const __dirname = fileURLToPath(new URL('..', import.meta.url));
const resolvePath = (p: string) => path.resolve(__dirname, p);

// eslint-disable-next-line @typescript-eslint/no-unused-expressions
!(async () => {
const moduleEntry = {
index: resolvePath('packages'),
Expand Down

0 comments on commit c01a131

Please sign in to comment.