You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, only the selected range (either by lines or anchors) should be displayed, but the user should be able to run the whole file with Playground, expand all content, and edit the content.
As I've seen that's currently not possible as only the shown part of the file will be sent to the playground.
This displays the selected anchor of the file, keep the content editable, and displays the play button.
However, when the reader taps on play, only the selected content between the anchors will be sent to the Rust playground, so it won't compile, as the the main function and some of the .rs file's content is not in the snippet.
Problem
I want to be able to include a code snippet
that is:
By default, only the selected range (either by lines or anchors) should be displayed, but the user should be able to run the whole file with Playground, expand all content, and edit the content.
As I've seen that's currently not possible as only the shown part of the file will be sent to the playground.
The closest I got is:
This displays the selected anchor of the file, keep the content editable, and displays the play button.
However, when the reader taps on play, only the selected content between the anchors will be sent to the Rust playground, so it won't compile, as the the main function and some of the .rs file's content is not in the snippet.
Another approach I tried is this
This will show only the selected part of the file, it will run the whole file, BUT it won't be editable.
If I add the
editable
tag, it becomes editable, it runs the examples with Playgorund BUT the whole file is rendered, not only the selected region.Proposed Solution
I should be able to
All four should be true.
Notes
It would be great if this could work:
Or alternatively, a global "editable-by-default" flag in the
book.toml
:The text was updated successfully, but these errors were encountered: