Skip to content

Not backward compatible, somwhere between 3.0.3 and 3.1.1 method copyCode was removed #25

@gamebak

Description

@gamebak

Can I ask you bring back copyCode method or give an alternative to this in order to use custom positioning for external buttons?

    copyCode(t) {
      t.target.insertAdjacentHTML(
        "afterend",
        `<textarea id="clipboard-textarea">${this.$refs.code.innerText}</textarea>`
      );
      const e = document.getElementById("clipboard-textarea");
      e.select(), e.setSelectionRange(0, 99999), document.execCommand("copy"), e.remove(), this.$emit("copied", this.$refs.code.innerText);
    }

Right now, this is missing and it's causing problems.

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