-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
support for @fortawesome/free-* library icons #76
Comments
If you want to work on this then I would accept a Pull Request, I'm not going to work on this myself, I just don't have the time to spend on this anymore. |
That's fair @ghiscoding. I looked at the code to see how much effort it would be. It's not clear to me where the actual editor tool component on top of the text area exists. Where you configure the buttons as strings (e.g. fa fa-strikethrough) could also support IconDefinition from FontAwesome. If you could point me to the place where the buttons are defined in the code. Can't find md-header. Cheers |
I think you can read the buttons from const defaultButtons = $.fn.markdown.defaults.buttons;
// loop through all buttons and change all necessary icons
const newButtons = ...
// reassign to your editor options
this.editorOptions = {
iconLibrary: 'fa', // change this if other than fa (font-awesome)
buttons: newButtons so you might be able to do this without having to modify the library at all the buttons have the structure shown below, angular-markdown-editor/src/lib/angular-markdown-editor/global-editor-options.ts Lines 15 to 24 in 7707621
and here's the link of where that is located in the bootstrap-markdown library, where the buttons are all defined: |
Yeah, I saw that.... but I don't know where this gets used. How / Where is the toolbar actually generated using this config? |
in the external library I guess that it would still be preferable to remove angular-markdown-editor/package.json Lines 39 to 42 in 7707621
|
Clear and concise description of the problem
Thank you for a great editor. Superb! 🦸♂️
We are already using FontAwesome heavily by importing individual icons (e.g. faBell) into our apps with <fa-icon [icon]="faBell">. It keeps it manageable.
By having to doubly import the entire CSS library increases the size of our main bundle quite dramatically.
Suggested solution
Moving away from using the entire FontAwesome CSS library is the optimal way forward. Only import the icons your component needs.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: