Browse Source

fix: Made code as block node and quotes as inline node

pull/7046/head
Muhammed Mustafa 1 year ago
parent
commit
8f52fa5db6
  1. 16
      packages/nc-gui/components/cell/RichText/SelectedBubbleMenu.vue
  2. 1
      packages/nc-gui/lang/en.json

16
packages/nc-gui/components/cell/RichText/SelectedBubbleMenu.vue

@ -9,6 +9,7 @@ import MsFormatH2 from '~icons/material-symbols/format-h2'
import MsFormatH3 from '~icons/material-symbols/format-h3' import MsFormatH3 from '~icons/material-symbols/format-h3'
import TablerBlockQuote from '~icons/tabler/blockquote' import TablerBlockQuote from '~icons/tabler/blockquote'
import MsCode from '~icons/material-symbols/code' import MsCode from '~icons/material-symbols/code'
import MsFormatQuote from '~icons/material-symbols/format-quote'
interface Props { interface Props {
editor: Editor editor: Editor
@ -117,15 +118,26 @@ const onToggleLink = () => {
<MdiFormatStrikeThrough /> <MdiFormatStrikeThrough />
</NcButton> </NcButton>
</NcTooltip> </NcTooltip>
<NcTooltip> <NcTooltip v-if="embedMode">
<template #title> {{ $t('general.code') }}</template> <template #title> {{ $t('general.code') }}</template>
<NcButton
size="small"
type="text"
:class="{ 'is-active': editor.isActive('codeBlock') }"
@click="editor!.chain().focus().toggleCodeBlock().run()"
>
<MsCode />
</NcButton>
</NcTooltip>
<NcTooltip v-else>
<template #title> {{ $t('general.quote') }}</template>
<NcButton <NcButton
size="small" size="small"
type="text" type="text"
:class="{ 'is-active': editor.isActive('code') }" :class="{ 'is-active': editor.isActive('code') }"
@click="editor!.chain().focus().toggleCode().run()" @click="editor!.chain().focus().toggleCode().run()"
> >
<MsCode /> <MsFormatQuote />
</NcButton> </NcButton>
</NcTooltip> </NcTooltip>
<div class="divider"></div> <div class="divider"></div>

1
packages/nc-gui/lang/en.json

@ -75,6 +75,7 @@
"matterMost": "Mattermost", "matterMost": "Mattermost",
"twilio": "Twilio", "twilio": "Twilio",
"whatsappTwilio": "WhatsApp Twilio", "whatsappTwilio": "WhatsApp Twilio",
"quote": "Quote",
"submit": "Submit", "submit": "Submit",
"create": "Create", "create": "Create",
"createEntity": "Create {entity}", "createEntity": "Create {entity}",

Loading…
Cancel
Save