Skip to content

"Reset Button" option #10711

@VibhorJaiswal

Description

@VibhorJaiswal

Have you read the Contributing Guidelines on issues?

Description

Like the existing 'CopyButton,' a 'ResetButton' would be a valuable addition. This feature can be used by websites, such as React Bootstrap, to allow users to reset example codes to their original state."

Has this been requested on Canny?

No response

Motivation

This option is available on some websites, such as MUI, and it enhances user experience by allowing users to easily restore example code to its original state.

API design

Here’s a rough design of how the feature could look. I’ve taken a screenshot from React Bootstrap's code editor and edited it to illustrate the idea.

image

Have you tried building it?

No response

Self-service

  • I'd be willing to contribute this feature to Docusaurus myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions