(core) Add Markdown cell format

Summary:
Text columns can now display their values as Markdown-formatted text
by changing their cell format to "Markdown". A minimal subset of the
Markdown specification is currently supported.

Test Plan: Browser tests.

Reviewers: Spoffy, dsagal

Reviewed By: Spoffy, dsagal

Subscribers: dsagal, Spoffy

Differential Revision: https://phab.getgrist.com/D4326
This commit is contained in:
George Gevoian
2024-08-22 23:51:09 -04:00
parent 5c486e686e
commit 292c894b93
26 changed files with 353 additions and 84 deletions

View File

@@ -447,6 +447,9 @@ export const ThemeColors = t.iface([], {
"widget-gallery-secondary-header-fg": "string",
"widget-gallery-secondary-header-bg": "string",
"widget-gallery-secondary-header-bg-hover": "string",
"markdown-cell-light-bg": "string",
"markdown-cell-light-border": "string",
"markdown-cell-medium-border": "string",
});
const exportedTypeSuite: t.ITypeSuite = {

View File

@@ -583,6 +583,11 @@ export interface ThemeColors {
'widget-gallery-secondary-header-fg': string;
'widget-gallery-secondary-header-bg': string;
'widget-gallery-secondary-header-bg-hover': string;
/* Markdown Cell */
'markdown-cell-light-bg': string;
'markdown-cell-light-border': string;
'markdown-cell-medium-border': string;
}
export const ThemePrefsChecker = createCheckers(ThemePrefsTI).ThemePrefs as CheckerT<ThemePrefs>;

View File

@@ -562,4 +562,9 @@ export const GristDark: ThemeColors = {
'widget-gallery-secondary-header-fg': '#FFFFFF',
'widget-gallery-secondary-header-bg': '#70707D',
'widget-gallery-secondary-header-bg-hover': '#60606D',
/* Markdown Cell */
'markdown-cell-light-bg': '#494958',
'markdown-cell-light-border': '#32323F',
'markdown-cell-medium-border': '#555563',
};

View File

@@ -562,4 +562,9 @@ export const GristLight: ThemeColors = {
'widget-gallery-secondary-header-fg': '#FFFFFF',
'widget-gallery-secondary-header-bg': '#929299',
'widget-gallery-secondary-header-bg-hover': '#7E7E85',
/* Markdown Cell */
'markdown-cell-light-bg': '#F7F7F7',
'markdown-cell-light-border': '#E8E8E8',
'markdown-cell-medium-border': '#D9D9D9',
};