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

Editor icons are not loading #475

Open
geekdeb opened this issue Jul 11, 2022 · 17 comments
Open

Editor icons are not loading #475

geekdeb opened this issue Jul 11, 2022 · 17 comments

Comments

@geekdeb
Copy link

geekdeb commented Jul 11, 2022

I am trying on Angular-14 and angular-editor-2.2.0-beta.0. The Editor icons are not loading.
Screenshot from 2022-07-12 01-53-24

Also, I could see these errors in the console. And I guess this is due to the removal of the CDN link in the latest merge.
image

Kindly let me know the workaround if any.

@pietzschke
Copy link
Contributor

Yes, please use the new v3.0.0-beta.0 version and include the following in the assets section in the angular.json:

{
  "glob": "**/*",
  "input": "./node_modules/@kolkov/angular-editor/assets/",
  "output": "./assets/fonts/"
}

@alex-goods
Copy link

alex-goods commented Sep 13, 2022

hi
i tried this approach but its still not working, i have no console errors but the icons are not showing, i can see them in the devtools but the button is empty
image
image

thx

@anandjaisy
Copy link

"assets": [
              "src/favicon.ico",
              "src/assets",
              {
                "glob": "**/*",
                "input": "./node_modules/@kolkov/angular-editor/assets/",
                "output": "./assets/fonts/"
              }
            ],

worked for me

@T4toh
Copy link

T4toh commented Nov 8, 2022

Have the same issue.

image

@ArturGudiev
Copy link

ArturGudiev commented Nov 9, 2022

There are 2 assets. build and test in angular.json

Make sure you included it into build assets like this

image

@T4toh
Copy link

T4toh commented Nov 9, 2022

There are 2 assets. build and test in angular.json

Make sure you included it into build assets

I fix the issue installing awesome fonts or something like that. I couldn't find the dependency in the documentation, but the dev of the package talk about it in an issue like this one.

@alex-goods
Copy link

anandjaisy

this worked for me too, thx:>

@philecom
Copy link

philecom commented Dec 8, 2022

If the above solutions don't work for you, you can try what I did.

  1. Copy the entire content of "node_modules@kolkov\angular-editor\assets"
  2. Create a folder called "fonts" in your app assets folder so you will have "src\assets\fonts"
  3. Paste the copied contents (font awesome files).

that's all.

@youquijano
Copy link

"assets": [
              "src/favicon.ico",
              "src/assets",
              {
                "glob": "**/*",
                "input": "./node_modules/@kolkov/angular-editor/assets/",
                "output": "./assets/fonts/"
              }
            ],

worked for me

this also worked for me.

@youquijano
Copy link

i run this cli
ng build --c=production --base-href /mysite/

but still the icons are not showing. what am i missing?

@dmitrikovalevski
Copy link

I moved object with { glob, input, output } above. It take first position below all strings. This works for me.

image

@veer05
Copy link

veer05 commented Jul 19, 2023

Same issue, I use --base-href and the application is trying to look at parent path and fails
Temporary workaround

In index.html file add this
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> 2. In your css file add this

::ng-deep angular-editor-toolbar button i {
  font-family: FontAwesome !important; 
  } 

@Pimpollo30
Copy link

Same issue, I use --base-href and the application is trying to look at parent path and fails Temporary workaround

In index.html file add this <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> 2. In your css file add this

::ng-deep angular-editor-toolbar button i {
  font-family: FontAwesome !important; 
  } 

@veer05 temporary solution worked for me, thanks

@ZenulAbidin
Copy link

This might be obvious but also check that your font was not set to a white color by accident by some framework - in that case the fonts are actually loaded but you might be fooled into thinking they are not present.

@qqaimh
Copy link

qqaimh commented Apr 27, 2024 via email

@BraianS
Copy link

BraianS commented Apr 27, 2024

Good morning everyone, it worked perfectly.

@mohaseebtariq
Copy link

mohaseebtariq commented Nov 7, 2024

#573

I fixed this by adding the font, and it worked initially. But when I added a glob in angular.json to include icons in my build, they still wouldn’t show up when running locally. Another issue was that my app has a baseUrl, so all assets load from there, but the FontAwesome files were being served internally from the library, which broke the pathing. To solve this, I forked the library and added the Angular @fortawesome/angular-fontawesome package. Now, the icons load consistently with the rest of the assets, and this issue won’t reoccur.

Until my PR gets merged, I’ve uploaded it to my npm registry for anyone interested: npm i @mhaseebtariq/angular-editor. I’m also using it in production at my company. Once the PR is approved, you can switch back to the original package—credit, of course, goes to the original author. This is just a quick fix!

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