|
@@ -46,14 +46,14 @@ export const ToolbarItems: FC<{
|
|
|
id="toolbar-undo"
|
|
id="toolbar-undo"
|
|
|
label={t('toolbar_undo')}
|
|
label={t('toolbar_undo')}
|
|
|
command={undo}
|
|
command={undo}
|
|
|
- icon={bsVersion({ bs5: 'undo', bs3: 'undo' }) as string}
|
|
|
|
|
|
|
+ icon={bsVersion({ bs5: 'undo', bs3: 'undo' })}
|
|
|
shortcut={isMac ? '⌘Z' : 'Ctrl+Z'}
|
|
shortcut={isMac ? '⌘Z' : 'Ctrl+Z'}
|
|
|
/>
|
|
/>
|
|
|
<ToolbarButton
|
|
<ToolbarButton
|
|
|
id="toolbar-redo"
|
|
id="toolbar-redo"
|
|
|
label={t('toolbar_redo')}
|
|
label={t('toolbar_redo')}
|
|
|
command={redo}
|
|
command={redo}
|
|
|
- icon={bsVersion({ bs5: 'redo', bs3: 'repeat' }) as string}
|
|
|
|
|
|
|
+ icon={bsVersion({ bs5: 'redo', bs3: 'repeat' })}
|
|
|
shortcut={isMac ? '⇧⌘Z' : 'Ctrl+Y'}
|
|
shortcut={isMac ? '⇧⌘Z' : 'Ctrl+Y'}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
@@ -79,7 +79,7 @@ export const ToolbarItems: FC<{
|
|
|
label={t('toolbar_format_bold')}
|
|
label={t('toolbar_format_bold')}
|
|
|
command={commands.toggleBold}
|
|
command={commands.toggleBold}
|
|
|
active={isActive('\\textbf')}
|
|
active={isActive('\\textbf')}
|
|
|
- icon={bsVersion({ bs5: 'format_bold', bs3: 'bold' }) as string}
|
|
|
|
|
|
|
+ icon={bsVersion({ bs5: 'format_bold', bs3: 'bold' })}
|
|
|
shortcut={isMac ? '⌘B' : 'Ctrl+B'}
|
|
shortcut={isMac ? '⌘B' : 'Ctrl+B'}
|
|
|
/>
|
|
/>
|
|
|
<ToolbarButton
|
|
<ToolbarButton
|
|
@@ -87,9 +87,7 @@ export const ToolbarItems: FC<{
|
|
|
label={t('toolbar_format_italic')}
|
|
label={t('toolbar_format_italic')}
|
|
|
command={commands.toggleItalic}
|
|
command={commands.toggleItalic}
|
|
|
active={isActive('\\textit')}
|
|
active={isActive('\\textit')}
|
|
|
- icon={
|
|
|
|
|
- bsVersion({ bs5: 'format_italic', bs3: 'italic' }) as string
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ icon={bsVersion({ bs5: 'format_italic', bs3: 'italic' })}
|
|
|
shortcut={isMac ? '⌘I' : 'Ctrl+I'}
|
|
shortcut={isMac ? '⌘I' : 'Ctrl+I'}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
@@ -124,19 +122,19 @@ export const ToolbarItems: FC<{
|
|
|
id="toolbar-href"
|
|
id="toolbar-href"
|
|
|
label={t('toolbar_insert_link')}
|
|
label={t('toolbar_insert_link')}
|
|
|
command={commands.wrapInHref}
|
|
command={commands.wrapInHref}
|
|
|
- icon={bsVersion({ bs5: 'link', bs3: 'link' }) as string}
|
|
|
|
|
|
|
+ icon={bsVersion({ bs5: 'link', bs3: 'link' })}
|
|
|
/>
|
|
/>
|
|
|
<ToolbarButton
|
|
<ToolbarButton
|
|
|
id="toolbar-ref"
|
|
id="toolbar-ref"
|
|
|
label={t('toolbar_insert_cross_reference')}
|
|
label={t('toolbar_insert_cross_reference')}
|
|
|
command={commands.insertRef}
|
|
command={commands.insertRef}
|
|
|
- icon={bsVersion({ bs5: 'sell', bs3: 'tag' }) as string}
|
|
|
|
|
|
|
+ icon={bsVersion({ bs5: 'sell', bs3: 'tag' })}
|
|
|
/>
|
|
/>
|
|
|
<ToolbarButton
|
|
<ToolbarButton
|
|
|
id="toolbar-cite"
|
|
id="toolbar-cite"
|
|
|
label={t('toolbar_insert_citation')}
|
|
label={t('toolbar_insert_citation')}
|
|
|
command={commands.insertCite}
|
|
command={commands.insertCite}
|
|
|
- icon={bsVersion({ bs5: 'menu_book', bs3: 'book' }) as string}
|
|
|
|
|
|
|
+ icon={bsVersion({ bs5: 'menu_book', bs3: 'book' })}
|
|
|
/>
|
|
/>
|
|
|
<InsertFigureDropdown />
|
|
<InsertFigureDropdown />
|
|
|
<TableInserterDropdown />
|
|
<TableInserterDropdown />
|
|
@@ -152,34 +150,28 @@ export const ToolbarItems: FC<{
|
|
|
id="toolbar-bullet-list"
|
|
id="toolbar-bullet-list"
|
|
|
label={t('toolbar_bullet_list')}
|
|
label={t('toolbar_bullet_list')}
|
|
|
command={commands.toggleBulletList}
|
|
command={commands.toggleBulletList}
|
|
|
- icon={
|
|
|
|
|
- bsVersion({
|
|
|
|
|
- bs5: 'format_list_bulleted',
|
|
|
|
|
- bs3: 'list-ul',
|
|
|
|
|
- }) as string
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ icon={bsVersion({
|
|
|
|
|
+ bs5: 'format_list_bulleted',
|
|
|
|
|
+ bs3: 'list-ul',
|
|
|
|
|
+ })}
|
|
|
/>
|
|
/>
|
|
|
<ToolbarButton
|
|
<ToolbarButton
|
|
|
id="toolbar-numbered-list"
|
|
id="toolbar-numbered-list"
|
|
|
label={t('toolbar_numbered_list')}
|
|
label={t('toolbar_numbered_list')}
|
|
|
command={commands.toggleNumberedList}
|
|
command={commands.toggleNumberedList}
|
|
|
- icon={
|
|
|
|
|
- bsVersion({
|
|
|
|
|
- bs5: 'format_list_numbered',
|
|
|
|
|
- bs3: 'list-ol',
|
|
|
|
|
- }) as string
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ icon={bsVersion({
|
|
|
|
|
+ bs5: 'format_list_numbered',
|
|
|
|
|
+ bs3: 'list-ol',
|
|
|
|
|
+ })}
|
|
|
/>
|
|
/>
|
|
|
<ToolbarButton
|
|
<ToolbarButton
|
|
|
id="toolbar-format-indent-decrease"
|
|
id="toolbar-format-indent-decrease"
|
|
|
label={t('toolbar_decrease_indent')}
|
|
label={t('toolbar_decrease_indent')}
|
|
|
command={commands.indentDecrease}
|
|
command={commands.indentDecrease}
|
|
|
- icon={
|
|
|
|
|
- bsVersion({
|
|
|
|
|
- bs5: 'format_indent_decrease',
|
|
|
|
|
- bs3: 'outdent',
|
|
|
|
|
- }) as string
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ icon={bsVersion({
|
|
|
|
|
+ bs5: 'format_indent_decrease',
|
|
|
|
|
+ bs3: 'outdent',
|
|
|
|
|
+ })}
|
|
|
shortcut={visual ? (isMac ? '⌘[' : 'Ctrl+[') : undefined}
|
|
shortcut={visual ? (isMac ? '⌘[' : 'Ctrl+[') : undefined}
|
|
|
disabled={listDepth < 2}
|
|
disabled={listDepth < 2}
|
|
|
/>
|
|
/>
|
|
@@ -187,12 +179,10 @@ export const ToolbarItems: FC<{
|
|
|
id="toolbar-format-indent-increase"
|
|
id="toolbar-format-indent-increase"
|
|
|
label={t('toolbar_increase_indent')}
|
|
label={t('toolbar_increase_indent')}
|
|
|
command={commands.indentIncrease}
|
|
command={commands.indentIncrease}
|
|
|
- icon={
|
|
|
|
|
- bsVersion({
|
|
|
|
|
- bs5: 'format_indent_increase',
|
|
|
|
|
- bs3: 'indent',
|
|
|
|
|
- }) as string
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ icon={bsVersion({
|
|
|
|
|
+ bs5: 'format_indent_increase',
|
|
|
|
|
+ bs3: 'indent',
|
|
|
|
|
+ })}
|
|
|
shortcut={visual ? (isMac ? '⌘]' : 'Ctrl+]') : undefined}
|
|
shortcut={visual ? (isMac ? '⌘]' : 'Ctrl+]') : undefined}
|
|
|
disabled={listDepth < 1}
|
|
disabled={listDepth < 1}
|
|
|
/>
|
|
/>
|