-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 support bootstrap #133
Comments
thanks |
You can place the bootstrap's |
Look at the pictures, for example: |
|
@dreamhuo adding JS is slightly different from adding CSS (same as #51) and as in this case, it breaks stuff. I'd suggest you adding JS after the render editor.addComponents(`
<script src="dist/jquery-3.2.1.min.js"></script>
<script src="demo/assets/js/bootstrap.min.js"></script>
`) or even better try to load your template via config <div id="gjs"></div>
<script type="text/javascript">
var editor = grapesjs.init({
container : '#gjs',
components: `
<div>...</div>
<script src="dist/jquery-3.2.1.min.js"></script>
<script src="demo/assets/js/bootstrap.min.js"></script>
`,
style: '.txt-red{color: red}',
});
</script> |
Master, on your way, I always make mistakes here: |
The same is true of the addComponents method. |
@artf |
Seems like browser's parser issue, can't do a lot, you might try with '<\/script>' if you want |
Thank you very much for your patience. @artf |
I have faced same issue. But escaping editor.addComponents('<script src="../somejs.js"><\/script>') |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi, I want to edit the bootstrap template with grapesjs, but it doesn't work. How to do reference bootstrapJS in grapesjs? And let both work.
The text was updated successfully, but these errors were encountered: