-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Copy to clipboard in query builder #6584
Conversation
Querybuilder copy to clipboard
@crgrieve it seems like a great Idea, but I think it would be useful to create e.g. a component like Maybe this button as part of the code area, e.g. in top right corner. This could also use a plugin to highlight code syntax and e.g. possible to specify the code syntax via a property. Not sure if it is possible to auto detect the code syntax. Also it would be great if this code snippet use font like monospace or similar. As far I can see we don't have any syntax highlighting except ace code editor, but we could use highlight.js @nul800sebastiaan any thoughts on this? An example in a newer version of Angular, but it might work as inspiration.
|
@nul800sebastiaan okay, but adding this as a component might be useful anyway, e.g. in the custom view after installing a package :) |
We usually try to work with the 80/20 rule: will adding something like this benefit 80% of the users of the CMS? In this case, I don't see this benefiting very many people so the answer is: not right now. :-) |
Thanks very much @crgrieve - nice work! 👍 |
@nul800sebastiaan an alternative to highlight.js could be Prism, but yes depends on if we need it somewhere else in backoffice, e.g. it seems this blogpost is using Prism to show the code snippets: |
@nul800sebastiaan a benefit with Prism is that TinyMCE support this to allow inserting code snippet into the richtext editor. |
Hello,
I thought it would be cool (and hopefully useful) to have "copy to clipboard" functionality to the Query Builder in template editor.
See screenshot:
Thanks,
Carole