Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] The Copy button on the toolbar is not working #936

Open
3 tasks done
taowang1993 opened this issue Oct 6, 2024 · 0 comments
Open
3 tasks done

[Bug Report] The Copy button on the toolbar is not working #936

taowang1993 opened this issue Oct 6, 2024 · 0 comments
Labels
🐞bug Something isn't working

Comments

@taowang1993
Copy link

taowang1993 commented Oct 6, 2024

Prerequisites

Describe the Bug

<script src="https://cdn.jsdelivr.net/npm/cherry-markdown@0.8.49/dist/cherry-markdown.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cherry-markdown@0.8.49/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

@taowang1993 taowang1993 added the 🐞bug Something isn't working label Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant