Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Copying and pasting codeblocks from reading mode retains line numbers and icons #23

Open
mayurankv opened this issue Jul 8, 2023 · 5 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed reading mode Relevant to Obsidian reading mode

Comments

@mayurankv
Copy link
Owner

Describe the bug

Selecting codeblocks, copying and then pasting in reading mode includes line numbers and header titles and header icons

Steps to reproduce

Create a codeblock, copy it in reading mode and paste it in editing mode.

Expected behaviour

Only the codeblock content inside a codeblock (or at most the codeblock parameters) should be pasted

Current behaviour

The line numbers are pasted as code as well as the header content (icons, titles, language tags).

Environment

  • Plugin Version: 1.0.0
  • Obsidian Version: 1.3.5
  • Platform: Desktop
  • OS: macOS

Screenshots

Additional context

@mayurankv mayurankv added bug Something isn't working help wanted Extra attention is needed reading mode Relevant to Obsidian reading mode labels Jul 8, 2023
@mayurankv mayurankv self-assigned this Jul 8, 2023
@Dimava
Copy link
Contributor

Dimava commented Aug 8, 2023

Ctrl+Shift+V ("paste without formatting") solves it

@mayurankv
Copy link
Owner Author

This pastes the raw text but this issue was set up with the end goal of replicating the standard obsidian functionality where copying and pasting the codeblock (just normal Ctrl-V) pastes a full codeblock with correct language and delimiters.

@github-actions
Copy link

github-actions bot commented Oct 8, 2023

This issue is stale because it has been open 60 days with no activity.

@github-actions github-actions bot added the Stale label Oct 8, 2023
@mayurankv mayurankv removed the Stale label Oct 24, 2023
Copy link

This issue is stale because it has been open 60 days with no activity.

@github-actions github-actions bot added the Stale label Dec 24, 2023
@mayurankv mayurankv removed the Stale label Feb 12, 2024
@FeralFlora
Copy link

Has this been resolved? I can't replicate the issue in Obsidian 1.7.4 and Code Styler 1.1.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed reading mode Relevant to Obsidian reading mode
Projects
None yet
Development

No branches or pull requests

3 participants