Plugin Options

Less than 1 minute

selector

Code block selector

showInMobile

Whether to display copy button on the mobile device

duration

Hint display time, setting it to 0 will disable the hint.

pure

Whether generate a small simple button with pure style.

delay

  • Type: number
  • Default: 500

The delay of registering copy code buttons, in ms.

If the theme you are using has a switching animation, it is recommended to configure this option to Switch animation duration + 200.

locales

  • Type: CopyCodeLocaleConfig

    interface CopyCodeLocaleData {
      /**
       * Copy button label text
       */
      copy: string;
    
      /**
       * Success message text after content is copied
       */
      hint: string;
    }
    
    interface CopyCodeLocaleConfig {
      [localePath: string]: CopyCodeLocaleData;
    }
    
  • Required: No

Locales config for copy code plugin.

Built-in Supported Languages
  • Simplified Chinese (zh-CN)
  • Traditional Chinese (zh-TW)
  • English (United States) (en-US)
  • German (de-AT)
  • Russian (ru-RU)
  • Ukrainian (uk-UA)
  • Vietnamese (vi-VN)
  • Portuguese (Brazil) (pt-BR)
  • Polish (pl-PL)
  • French (fr-FR)
  • Spanish (es-ES)
  • Slovak (sk-SK)
  • Japanese (ja-JP)
  • Turkish (tr-TR)
  • Korean (ko-KR)
Loading...