-
Notifications
You must be signed in to change notification settings - Fork 114
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
feat(docs): automatic links to Web IDE from code blocks in Cookbook #994
Conversation
Is is possible to move the links somewhere to the top of the code snippets? |
Yes, but I believe it's a bit worse since it kinda breaks the flow of the text. I can change the z-index or make it float, but that would overlap with text sometimes. I've also tried extending the code blocks themselves and introducing another button adjacent to the copy button, but because the button's HTML/CSS were so rigid that attempt failed. They (expressive code plugin) have great extensibility and API for various cool transformations on code blocks, but have no robust way to add another button :) |
Right now I'm removing such buttons from code blocks with signatures in the Reference section mainly |
I would also say that opening links in Web IDE mostly makes sense for complete contracts. |
That was my original thought too, but then I decided to allow all code samples but the ones in signatures — that way users can quickly tinker with any examples. But we may only allow such links for Cookbook examples, that's also fine |
yeah, let's start with Cookbook first and if there is popular demand, we will add more links |
Also disallow links from single-line code blocks (not inline code), since they generally pose little value to be copied that way
Issue
Closes #913.
Checklist
Preview
See the small "Open in Web IDE" buttons on bottom right side of each (!) code block: