Skip to content

Preventing pasted text from being inserted into the textarea? #45

@jmuheim

Description

@jmuheim

Besides using paste.js for pasting images to textareas, I also use it to react on pasted strings that have a specific format.

E.g., when pasting a codepen url like https://codepen.io/jmuheim/pen/KmKOZO, I don't want to insert this exact string into the textarea, but a markdown link to it, like this: [CodePen.io](https://codepen.io/jmuheim/pen/KmKOZO).

For this, I need to prevent the original string being inserted into the textarea. How can this be achieved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions