Copy to Clipboard Advice

Hello all,

I’m looking into copying comments, which I have KIND OF got working but need some advice. I’m using ClipboardJS for the functionality.

My only problem is that I can’t seem to copy the RENDERED (final output on screen) comment.


COPY HTML

<li class="clipboard-html btn" data-clipboard-text="<?= $this->text->markdown($comment['comment'], isset($is_public) && $is_public) ?>">Copy HTML</li>

This works fine, except the result is in html code e.g. <h3>comment title</h3><p>text comment</p>


COPY MARKDOWN

<li class="clipboard-md btn" data-clipboard-text="<?= $this->text->e($comment['comment']) ?>">Copy Markdown</li>

This works fine, except the result is in markdown code e.g. ### Site Visit | Location | test location |


COPY RENDERED
I can’t seem to copy the final output. Any ideas?

I fixed it, will be a useful feature in the plugin for those who work a lot with comments