Bug: Add option to disable Copy button, cuz it have conflict with theme and builtin feature
Describe the bug
Steps to reproduce
Hover cursor on copy button
Yes
```mysql
select * from user\G
```
Expected behavior
Appears on hover and stay
Current behavior
Glitching
Environment
- Plugin Version:
- 1.1.7
- Obsidian Version:
- 1.7.7
- Platform:
- Desktop
- OS:
- Win
- Theme:
- Phoenix, Default
- CSS Snippets:
- Disabled
Screenshots
https://github.com/user-attachments/assets/79594dbb-e468-477e-b213-139adaa389fc
Additional context
No
Currently refactoring the plugin! Nearly done! This should be fixed soon. Sorry for the issue! As a temporary workaround you can find the button in a css selector and add display:none if you are confident.
Please, i propose, if it possible, add option to disable plugin Copy button, cuz Obsidian have own without sliding animation, and i think, it looks more convenient
I am currently upgrading the plugin as I mentioned. Obsidian updated the copy button since I last updated this plugin so the styling doesn't appear to work anymore. I will indeed be upgrading it to match the default setting, and will do this through as little markup as possible, but I want the preview and reading mode copy buttons to look the same which they don't at all in default obsidian. I hope that makes sense.
What I mean to say is it's unlikely I'll completely leave the default copy button, but I will try and do as minimal changes to make them appear consistent in both live preview and reading mode. I do plan on removing the sliding feature though!
@mayurankv I'm also waiting for this issue to be resolved. I'm not sure how to temporarily disable this button using CSS. Could you please explain?
I wrote this CSS code snippet, it's useful for me. Hope it helps you. @Kol9yN @MrSergioRodrigo
/* remove "code-styler" copy button */
body pre.code-styler-pre:has(.code-styler-header-container-hidden) button.copy-code-button,
body .markdown-source-view :not(pre.code-styler-pre) > .code-styler-header-container-hidden + .HyperMD-codeblock-begin span.code-block-flair{
display: none !important;
}
Obsidian version: 1.8.7 theme: minimal
@lasterX Thanks, but unfortunately it didn't work for me. If I use this snippet, the copy buttons disappear altogether.
I tried the same version as you have 1.8.7, and even tried to put the theme minimal
i think just need to wait until project owner rework it
Hi sorry, I recently started a new job and haven't had the time to complete the refactor which solves this issue, will try and get back to it soon :((