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

TinyMCE editor #79

Open
pagodzik opened this issue Jan 28, 2021 · 1 comment
Open

TinyMCE editor #79

pagodzik opened this issue Jan 28, 2021 · 1 comment

Comments

@pagodzik
Copy link

Hi

I installed TinyMCE by composer. So we have path "/vendor/tinymce/tinymce/tinymce.js"
How should I include this to my twig html? All js I have in public/js/ - shoud I move there also tinymce files ?

Regards

@daveh
Copy link
Owner

daveh commented Jan 29, 2021

Composer was designed for PHP packages, i.e. PHP code that will be used on the server. By design, files not in the public folder can't be accessed in a browser, so you can't access that JavaScript file in the browser. You have a couple of options - for TinyMCE, the simplest is to load it from a CDN - details here (scroll down to "Get Started with TinyMCE").

Alternatively you could copy the relevant files from the vendor folder to the public folder, you can do this manually or use a Composer script to do this automatically every time the package is updated.

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

2 participants