adding assets to angular.json
See original GitHub issueJust a suggestion for angular integration. Rather than copying assets to the src directory as per documentation, instead add this to angular.json.
Under projects > architect > build
"assets": [
... other assets
{ "glob": "**/*", "input": "./node_modules/tinymce/skins", "output": "/skins/" },
{ "glob": "**/*", "input": "./node_modules/tinymce/plugins", "output": "/plugins/" }
],
"scripts": [
... other scripts
"node_modules/tinymce/tinymce.js",
"node_modules/tinymce/themes/modern/theme.js"
]
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Angular CLI: Different ways to include assets - Łukasz Nojek
Angular CLI: Different ways to include assets · Assets from the assets folder · Assets from other folders · Rename/move assets · Include...
Read more >Angular workspace configuration
Assets configurationlink Each build target configuration can include an assets array that lists files or folders you want to copy as-is when building...
Read more >Include assets when building angular library - Stack Overflow
Add an assets folder at the root of your library project enter image description here · Add "assets": ["./assets"], into the ng-package.json file ......
Read more >Working With Assets and Global Styles and Scripts in Angular
In this post, we are going to take a closer look at how we to work with assets (web assets) and global styles...
Read more >Angular 12 - How to Load JSON Data from Assets Folder?
Step 1 – Create and Setup Angular Project · Step 2 – Create JSON File in Assets Folder · Step 3 – Install...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ashgibson I agree that the readme should describe loading TinyMCE in a similar fashion as you described. I’ve updated the readme to include this. The great benefit of doing this, instead of including everything as a global script, is of course simplicity but also it matters to bundle size. Tiny can load everything it requires on initialization instead of having everything(plugins, theme) included in the initial bundle.
@maxtacco Great to see what you have figured out! I’ve updated the readme to include something similar although I’ve opted to use
overrideDefaults
on the globaltinymce
object instead oftinyMCEPreInit
since it could be considered a legacy thing. The result is the same though.“node_modules/tinymce/themes/modern/theme.js” ] in my package the directory is mobile rather than modern is there any thing wrong?