ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.51k stars 3.7k forks source link

Code block button to copy content to the clipboard #9774

Open zadam opened 3 years ago

zadam commented 3 years ago

📝 Provide a description of the new feature

One of the most common actions made with code block is to copy its content (and then paste it into a IDE, terminal etc.). It would be useful to have a one click button to make this faster.

image


If you'd like to see this feature implemented, add a 👍 reaction to this post.

deajan commented 1 year ago

Any idea if we'd get that feature ?

Nriver commented 1 year ago

This is a cool feature, would the developers consider making this happen?

thanayut1750 commented 10 months ago

2023 nothing yet?

Masked-Kunsiquat commented 9 months ago

would be a very helpful feature (:

Witoso commented 9 months ago

Curious to hear a bit more detailed use case for this? Would you like to this copy button in the editing (writing in the editor), or it should also be downcasted to the saved HTML from the editor? I would love to hear some scenarios regarding this.

Nriver commented 9 months ago

I use Trilium for note-taking, and it relies on CKEditor for editing notes. The note content is in editing mode all the time.

deajan commented 9 months ago

@Witoso I am also using trilium, where I use CKEditor to take code notes. It would be really nice to have a copy button once the code is shown, so one can simply copy paste code into a shell.

thanayut1750 commented 9 months ago

one click copy the content in code block to clipboard image

in Trilium note example👇 image

zhdenny commented 7 months ago

Hopeful to see this feature added soon. Coming from Trilium as well

Guyon168 commented 3 months ago

https://github.com/Nriver/copy-code-block-widget/blob/main/README_CN.md 平替功能

另外东东大佬已经实现了该功能,就是不知如何实现的 https://www.ankia.top/3LdIi2f30Pan