Skip to content

Commit

Permalink
refactor: remove unused heading options and clean up icon styles
Browse files Browse the repository at this point in the history
  • Loading branch information
robinv8 committed Dec 3, 2024
1 parent 2770ffa commit 7147b4a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 81 deletions.
7 changes: 1 addition & 6 deletions ui/src/components/Editor/ToolBars/heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ let context: IEditorContext;
const Heading = () => {
const { t } = useTranslation('translation', { keyPrefix: 'editor' });
const headerList = [
{
text: `<h1 class="mb-0 h3">${t('heading.options.h1')}</h1>`,
level: 1,
label: t('heading.options.h1'),
},
{
text: `<h2 class="mb-0 h4">${t('heading.options.h2')}</h2>`,
level: 2,
Expand Down Expand Up @@ -60,7 +55,7 @@ const Heading = () => {
},
];
const item = {
label: 'type',
label: 'type-h2',
keyMap: ['Ctrl-h'],
tip: `${t('heading.text')} (Ctrl+h)`,
};
Expand Down
75 changes: 0 additions & 75 deletions ui/src/components/Editor/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,81 +69,6 @@
&:focus {
background-color: var(--ans-editor-toolbar-focus);
}
&.icon-heading {
background-position: 0px -144px;
}
&.icon-bold {
background-position: -24px -144px;
}
&.icon-italic {
background-position: -48px -144px;
}

&.icon-code {
background-position: -72px -144px;
}

&.icon-link {
background-position: -120px -144px;
}
&.icon-blockquote {
background-position: -144px -144px;
}
&.icon-image {
background-position: -168px -144px;
}
&.icon-video {
background-position: -192px -144px;
}
&.icon-table {
background-position: -216px -144px;
&.disabled {
background-position: -216px -168px !important;
}
}

&.icon-formula {
background-position: -528px -144px;
}
&.icon-indent {
background-position: -288px -144px;
}
&.icon-outdent {
background-position: -312px -144px;
}
&.icon-orderedList {
background-position: -240px -144px;
}
&.icon-unorderedList {
background-position: -264px -144px;
}
&.icon-hr {
background-position: -336px -144px;
}
&.icon-help {
background-position: -360px -144px;
}
&.icon-full {
background-position: -456px -144px;
}
&.icon-exit-sync-scroll {
background-position: -432px -144px;
}
&.icon-sync-scroll {
background-position: -432px -192px;
}
&.icon-exit-preview {
background-position: -408px -144px;
}
&.icon-preview {
background-position: -408px -192px;
}
&.icon-exit-full {
background-position: -480px -144px;
}
&.icon-chart {
background-position: -552px -144px;
}
}
.popup-wrap {
position: absolute;
Expand Down

0 comments on commit 7147b4a

Please sign in to comment.