question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

adding assets to angular.json

See original GitHub issue

Just 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:closed
  • Created 5 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
SimonFccommented, May 21, 2019

@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 global tinymce object instead of tinyMCEPreInit since it could be considered a legacy thing. The result is the same though.

1reaction
diankourenxiacommented, Mar 28, 2019

“node_modules/tinymce/themes/modern/theme.js” ] in my package the directory is mobile rather than modern is there any thing wrong?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found