Skip to content

Commit

Permalink
fix: set correct underline shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Jul 8, 2021
1 parent 431506d commit c82fce0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion projects/ngx-editor/schema/marks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ const code: MarkSpec = {
const u: MarkSpec = {
parseDOM: [
{ tag: 'u' },
{ style: 'text-decoration=underline' }
{
style: 'text-decoration=underline',
consuming: false
}
],
toDOM(): DOMOutputSpec {
return ['u', 0];
Expand Down
1 change: 1 addition & 0 deletions projects/ngx-editor/src/lib/defaultPlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const getKeyboardShortcuts = (schema: Schema, options: ShortcutOptions) => {
keymap({
'Mod-b': toggleMark(schema.marks.strong),
'Mod-i': toggleMark(schema.marks.em),
'Mod-u': toggleMark(schema.marks.u),
'Mod-`': toggleMark(schema.marks.code),
}),
keymap({
Expand Down

0 comments on commit c82fce0

Please sign in to comment.