A3: Custom icons do not appear in the context menu
See original GitHub issueHello, I noticed that setting/defining the icons in a custom module does not work nor when it is added it via the global list in modules/@apostrophecms/asset/lib/globalIcons.js
I am using the latest Apostrophe version 3.14.2
.
module.exports = {
extend: '@apostrophecms/widget-type',
options: {
label: 'Container',
icon: 'plus-box'
},
icons: {
'plus-box': 'PlusBox'
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How To Add And Remove Program Icons From Taskbar In ...
Right-click the taskbar and choose “Cortana", then Show Cortana icon ” from the pop-up menu. This tutorial will apply for computers, laptops, ...
Read more >Context menu and icons not appearing version 160.4.4703
Hi,. I'm on Windows 10/Home; Dropbox version 160.4.4703 and all files are synched. However, no context menu and no icons. It's driving me...
Read more >Working with the Element Context Menu - Paligo
You access the element context menu and guilabel is not shown in your favorites. This is because guilabel is not valid at the...
Read more >Use icons—ArcGIS Dashboards | Documentation
The following are tips for creating a custom icon: For an indicator, if you don't define a stroke or fill in your SVG...
Read more >Print in Microsoft Edge
Note that Immersive Reader may not be available for all websites. ... Right-click the selected text and then select Print in the context...
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 FreeTop 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
Top GitHub Comments
So, not a direct example like this using the rich-text-widget, but it is documented in two places.
For the
init(self)
it is in the reference section: https://v3.docs.apostrophecms.org/reference/module-api/module-overview.htmlFor the icon registration: https://v3.docs.apostrophecms.org/reference/module-api/module-options.html#icon
Not sure how to make it easier to navigate or another piece of documentation that would help. Any suggestions?
Hi @waldemar-p, For visibility reasons, it is usually better to start a new issue, rather than making comments on a closed one.
Onto your problem! So I would make a few changes in your code. I don’t think you can extend the globalIcons.js in that way. Instead, register the icon right in your
/modules/@apostrophecms/rich-text-widget/index.js
file. After theoptions
add:Although your code seems to be working, I would also refactor your project-level rich-text-widget configuration. Remove the require and the
editorTools
section from the options. Instead, move them to aninit()
section:Hope this helps!