-
Notifications
You must be signed in to change notification settings - Fork 416
New addon: blocks2text
#8572
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
base: master
Are you sure you want to change the base?
New addon: blocks2text
#8572
Conversation
Samq64
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the non-English translations removed? Translators will handle them later.
| return ""; | ||
| } | ||
|
|
||
| if (block.type === "text") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Colour inputs should also be in square brackets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. I'm not entirely sure what your final intention was. The current code seems fine, but happy to revisit if there's more context you'd like to share.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to have always used parentheses which is also fine so I'm not sure why the hex value wasn't surrounded with them before.
Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com>
|
Also custom block uses should have their categroy explicitly set since the definitions might not exist in the copied text. |
|
The main issue I see with this, which #7748 solves (#7988 does also, but lacks multi language support as a consequence), is how to force English translations so that it can be compatible with the forums, which require English blocks? this will require either mappings (in which case you should just use #7748), or changing editor language, rerendering, then converting back) |
Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com>
|
For the record, discussion has moved to #2336 |
Resolves #2336
Closes #7748
Closes #7988
Changes
This pull request adds a new addon: Copy Blocks as Text.
It allows users to copy blocks as scratchblocks text, making it easier to share code in forums or other platforms.
freecompress-._2025-09-19_191744.mp4
Features
Reason for changes
This addon enables users to copy scratchblocks text directly, avoiding the need to write it manually.
Tests
Tested on Chrome 140.
Note: