Menu
Menu is not part of the editor component. Include ngx-editor-menu
in your HTML manually.
Component props
- editor - (
Required
) editor instance - toolbar - (
Optional
) - disabled - (
Optional
) enable/disable menu bar - colorPresets - (
Optional
) - colors for color picker - customMenuRef - (
Optional
) - Template reference to custom menu item - dropdownPlacement - (
Optional
) - Placement for the dropdown. Can betop
orbottom
component.html
Custom Menu
To insert custom menu items into the editor-menu. Create a template and pass its reference to ngx-editor-menu
via customMenuRef
input prop. The template will be rendered after the toolbar items.
Note: The input is just a TemplateRef
, the menu component will render whatever template passed to it. Refer the existing toolbar items for classnames and reuse them as needed.
Editor
Custom Menu Template
Custom Menu Component
Floating Menu
The editor exposes a component which by default renders a minimal menu. Place it anywhere in the HTML. Technically it is just a wrapper which provides a wrapper and positions it relative to selection. You can render anything inside it as required.
OR
Component props
- editor - (
Required
) editor instance - autoPlace - (
Optional
) positions automatically to the top or bottom based on the space available.false
by default
Custom Icons in ngx-editor-menu
By default ngx-editor add a list of google font icons, but have an option for replace with the icons you need. Support svg/img/tags/etc, have the option for modify one or more icons. You can specify the icons in the forRoot
The list of icon you can change is:
- align_center
- align_justify
- align_left
- align_right
- bold
- bullet_list
- code
- color_fill
- format_clear
- horizontal_rule
- image
- italic
- link
- ordered_list
- quote
- strike
- text_color
- underline
- unlink
- path