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

Javascript code #168

Open
lbineau opened this issue Jun 15, 2016 · 5 comments
Open

Javascript code #168

lbineau opened this issue Jun 15, 2016 · 5 comments

Comments

@lbineau
Copy link

lbineau commented Jun 15, 2016

Hi,

I would want to execute some javascript into code snippet or having an "inline javascript" like "inline css".
How can I achieve that ? (in the sample below, Vue is undefined)
screen shot 2016-06-15 at 15 20 10

Thanks

@kestutis-buivydas
Copy link
Contributor

kestutis-buivydas commented Jun 15, 2016

Hi lbineau,

You should wait until document is ready to run your Vue code. See example:

Codepen

@lbineau
Copy link
Author

lbineau commented Jun 15, 2016

Thanks for replying.
The javascript in the code doesn't seem to be embed in the HTML output.
screen shot 2016-06-15 at 16 40 43

@lbineau
Copy link
Author

lbineau commented Jun 28, 2016

No more anwsers ? :(

@VaclovasV
Copy link
Contributor

@lbineau - if I am right, this is related with issue: http://stackoverflow.com/questions/18369410/how-to-add-javascript-code-into-existing-iframe-using-jquery
We need to implement this feature, for now, you can only use javascript global template. There is no simple way, to use inline javascript in snippet code.
@miezis - can you confirm?

@lbineau
Copy link
Author

lbineau commented Jul 5, 2016

I manage locally to have a inlineJs like inlineCss field. The code is running well but when I print the document inside the iframe, the document is the one from the global page.
image
Why it is not the one of the iframe, that's the point of iframes right ?

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