mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-12-21 06:51:19 +08:00
Add strikethrough, code, and table to md editor toolbar
This commit is contained in:
parent
f8b51bbfce
commit
20b88690f7
@ -23,6 +23,7 @@ const props = withDefaults(
|
||||
errorMessages?: string[];
|
||||
rules?: ValidationRule<string | undefined>[];
|
||||
noPaddingTop?: boolean;
|
||||
maxHeight?: string;
|
||||
}>(),
|
||||
{
|
||||
maxlength: 30_000,
|
||||
@ -30,6 +31,7 @@ const props = withDefaults(
|
||||
errorMessages: undefined,
|
||||
rules: undefined,
|
||||
noPaddingTop: false,
|
||||
maxHeight: "500px",
|
||||
}
|
||||
);
|
||||
|
||||
@ -90,10 +92,17 @@ async function startEditing() {
|
||||
forceSync: true,
|
||||
indentWithTabs: false,
|
||||
spellChecker: false,
|
||||
promptURLs: true,
|
||||
showIcons: ["strikethrough", "code", "table"],
|
||||
shortcuts: {
|
||||
drawTable: "Cmd-Alt-T",
|
||||
toggleStrikethrough: "Cmd-Alt-S",
|
||||
},
|
||||
sideBySideFullscreen: false,
|
||||
autoRefresh: {
|
||||
delay: 300,
|
||||
},
|
||||
maxHeight: props.maxHeight,
|
||||
previewClass: ["prose", "markdown", "background-default"],
|
||||
previewRender: (markdownPlaintext, previewElement) => {
|
||||
const html = useDomPurify().sanitize(parseMarkdown(markdownPlaintext));
|
||||
|
@ -84,6 +84,7 @@ function createPinnedVersionUrl(version: PinnedVersion): string {
|
||||
:cancellable="true"
|
||||
:maxlength="useBackendData.validations.project.sponsorsContent?.max"
|
||||
:title="i18n.t('project.sponsors')"
|
||||
max-height="200px"
|
||||
class="pt-0 mr-4"
|
||||
@save="saveSponsors"
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user