Skip to content
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

how to use Blockly.inject with node-blockly #5

Closed
wwj718 opened this issue Nov 9, 2016 · 7 comments
Closed

how to use Blockly.inject with node-blockly #5

wwj718 opened this issue Nov 9, 2016 · 7 comments

Comments

@wwj718
Copy link

wwj718 commented Nov 9, 2016

hi,

node-blockly is great, I like it

how to use Blockly.inject with node-blockly

@mo4islona
Copy link
Owner

mo4islona commented Nov 9, 2016

@mo4islona
Copy link
Owner

Install

Go to test/browser
npm i
webpack
Then open inject.html

@wwj718
Copy link
Author

wwj718 commented Nov 9, 2016

@mo4islona Great! thanks a lot

but I can't find media file. such as delete.mp3 , click.mp3 , handopen.cur

image

image

@mo4islona
Copy link
Owner

Blockly loads media assets automatically

There is an a option media – path from page (or frame) to the Blockly media directory. Defaults to https://blockly-demo.appspot.com/static/media/.

You can change this path

var Blockly = require('node-blockly/browser')
var workspace = Blockly.inject('inject', { media: "http://yourpath-to-media-assets", });

@wwj718
Copy link
Author

wwj718 commented Nov 12, 2016

Got it !thanks!

@JMLX42
Copy link

JMLX42 commented Aug 16, 2017

@mo4islona
Copy link
Owner

@promethe42 https://github.com/mo4islona/mo4islona.github.io/blob/master/blockly/index.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants