Member Junction
    Preparing search index...

    Options for the code copy functionality

    interface CodeCopyOptions {
        buttonClass?: string;
        copyIcon?: string;
        errorIcon?: string;
        feedbackDuration?: number;
        onCopy?: (code: string) => void;
        onError?: (error: Error) => void;
        showLanguageLabel?: boolean;
        successIcon?: string;
        toolbarClass?: string;
        tooltipText?: string;
    }
    Index

    Properties

    buttonClass?: string

    CSS class for the copy button

    'code-copy-btn'
    
    copyIcon?: string

    Icon HTML for the copy button

    '<i class="fas fa-copy"></i>'
    
    errorIcon?: string

    Icon HTML for failed copy

    '<i class="fas fa-times"></i>'
    
    feedbackDuration?: number

    Duration in ms to show success/error state

    2000
    
    onCopy?: (code: string) => void

    Callback when code is successfully copied

    onError?: (error: Error) => void

    Callback when copy fails

    showLanguageLabel?: boolean

    Whether to show the language label in the toolbar

    true
    
    successIcon?: string

    Icon HTML for successful copy

    '<i class="fas fa-check"></i>'
    
    toolbarClass?: string

    CSS class for the toolbar container

    'code-toolbar'
    
    tooltipText?: string

    Tooltip text for the copy button

    'Copy code'