cherry-markdown
cherry-markdown copied to clipboard
[Bug Report] The Copy button on the toolbar is not working
Prerequisites
- [X] There isn't an existing issue that reports the same bug to avoid duplicates.
- [X] The provided information offers a minimal reproducible example of the bug.
- [X] For Q&A, please open a GitHub Discussion instead.
Describe the Bug
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cherry-markdown.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/cherry-markdown.min.css">
<div id="@@AUTOID@@"></div>
<script>
new Cherry({
id: '@@AUTOID@@',
locale: 'en_US', // default langauge
editor: {
height: '100vh',
defaultModel: 'editOnly', // Split screen mode
autoSave2Textarea: true, // Auto-saves content
convertWhenPaste: true, // Converts pasted content to Markdown
writingStyle: 'normal', // Can change to 'focus' for less distraction
showSuggestList: true, // Provides auto-suggestions
},
toolbars: {
toolbar: [
'header',
'list',
'panel',
'detail',
{
insert: [
'image',
'audio',
'video',
'link',
'hr',
'br',
'code',
'formula',
'toc',
'table',
'line-table',
'bar-table',
'pdf',
'word',
],
},
'graph',
'settings',
'changeLocale', // language switcher
'theme',
],
bubble: ['bold', 'italic', 'underline', 'strikethrough', 'sub', 'sup', 'quote', '|', 'size', 'color'], // array or false
config: {
changeLocale: [
{
locale: 'en_US',
name: 'English'
},
{
locale: 'zh_CN',
name: '中文'
},
{
locale: 'ru_RU',
name: 'Русский'
}
]
}
},
engine: {
syntax: {
codeBlock: {
wrap: true,
lineNumber: true,
copyCode: true,
editCode: true,
},
mathBlock: {
engine: 'MathJax',
plugins: true,
},
table: {
enableChart: true,
},
toc: {
allowMultiToc: true,
showAutoNumber: true,
},
header: {
anchorStyle: 'autonumber',
},
list: {
listNested: true,
}
}
},
fileTypeLimitMap: {
video: 'video/*',
audio: 'audio/*',
image: 'image/*',
word: '.doc,.docx',
pdf: '.pdf',
},
multipleFileSelection: {
image: true, // Upload multiple images at once
video: true, // Upload multiple videos
audio: true, // Upload multiple audio files
},
previewer: {
enablePreviewerBubble: true, // Allows editing in preview mode
lazyLoadImg: {
noLoadImgNum: 5, // First 5 images load immediately
autoLoadImgNum: 5, // Next 5 load automatically
},
},
});
</script>
Reproduction Steps
No response
System Information
No response
Contributing
None
It looks like you haven't enabled copy