Skip to content

Commit

Permalink
Insert new citation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Integral authored and obuchtala committed Mar 5, 2020
1 parent 006b035 commit edcd024
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/SmartFigureConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
MoveItemCommand, RemoveItemCommand, MoveValueCommand, RemoveValueCommand,
AddAuthorCommand, InsertAuthorCommand, EditAuthorCommand,
AddAffiliationCommand, InsertAffiliationCommand, EditAffiliationCommand,
AddReferenceCommand
AddReferenceCommand, CreateCitationCommand
} from 'substance'

import SmartFigureLoader from './model/SmartFigureLoader'
Expand Down Expand Up @@ -93,6 +93,10 @@ export default class SmartFigureConfiguration extends Configurator {
nodeType: 'link',
accelerator: 'CommandOrControl+K'
})
config.addCommand('create-citation', CreateCitationCommand, {
nodeType: 'cite',
accelerator: 'CommandOrControl+Shift+C'
})
config.addCommand('insert-panel', InsertPanelCommand)
config.addCommand('remove-panel', RemoveItemCommand, { type: 'panel' })
config.addCommand('rename-panel-image', RenamePanelImageCommand)
Expand Down Expand Up @@ -163,6 +167,7 @@ export default class SmartFigureConfiguration extends Configurator {
{ command: 'toggle-subscript', icon: 'subscript', tooltip: 'Subscript' },
{ command: 'toggle-superscript', icon: 'superscript', tooltip: 'Superscript' },
{ command: 'create-link', icon: 'link', tooltip: 'Link' },
{ command: 'create-citation', icon: 'asterisk', tooltip: 'Citation' },
{
type: 'menu',
label: 'Smart Figure',
Expand Down Expand Up @@ -197,7 +202,8 @@ export default class SmartFigureConfiguration extends Configurator {
{ command: 'toggle-strike', icon: 'strikethrough', label: 'Strike Through' },
{ command: 'toggle-subscript', icon: 'subscript', label: 'Subscript' },
{ command: 'toggle-superscript', icon: 'superscript', label: 'Superscript' },
{ command: 'create-link', icon: 'link', label: 'Link' }
{ command: 'create-link', icon: 'link', label: 'Link' },
{ command: 'create-citation', icon: 'asterisk', label: 'Citation' }
]
})
config.addToolPanel('context-menu:panel', {
Expand Down

0 comments on commit edcd024

Please sign in to comment.