You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by "shuashuai (via GitHub)" <gi...@apache.org> on 2025/02/06 03:42:13 UTC
Re: [PR] feat: Copy code button [answer]
shuashuai commented on PR #1239:
URL: https://github.com/apache/answer/pull/1239#issuecomment-2638755910
> #1211
>
> copy.code.mov
First of all, thank you very much for your contribution. If you only look at the copy function, this contribution is perfect, but considering the code processing logic, the integrity of scene coverage, and the semantics.
1. `ImageViewer` component is used to handle global image enlargement and image exception styles. It is not appropriate to place the copy function code here.
2. The content of the ImageViewer package cannot completely cover all scenarios in the project that use the `pre` tag processing. All places in the project that use rich text rendering use `htmlRender` function, you can search globally to view the used scenes.
3. I also implemented a copy function in the previous article, you can refer to [this commit](https://github.com/apache/answer/commit/7a15e24f7bebb78d486725eabb9b4c5b6ea62968), but I prefer the animation you implement copy, which feels more elegant than the tooltip I use, or you can try combining these two solutions to achieve better Copy effect.
If you have any other questions, you are welcome to continue the discussion. I will do my best to help you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org