quasar-ui-qmarkdown icon indicating copy to clipboard operation
quasar-ui-qmarkdown copied to clipboard

Copy to clipboard includes code line numbers

Open jaimehrubiks opened this issue 3 months ago • 0 comments

Describe the bug

By default, or when using :no-line-numbers="false", the plugin will show line numbers on the left side, whenever you are using a code block

To Reproduce

<q-markdown show-copy :no-line-numbers="false">
```javascript
{{JSON.stringify(JSON.parse('{"name":"John", "age":30, "car":null}'), null, 2)}}
```
</q-markdown>

Expected behavior

Copy button should copy the content I set using the slot, or using the "src" component. Line numbers should be part of the style and shout not be copied.

Suggested Solution

Option A) Do not copy numbers

Option B) Create an event @on-copy that will return the actual content to be copied. This would solve many other similar issues.

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Chrome
  • Version: Latest

jaimehrubiks avatar Mar 12 '24 19:03 jaimehrubiks