mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
feat(extensions): Allow replacing editors using extensions (#37499)
This commit is contained in:
committed by
GitHub
parent
675a4c7a66
commit
6cb3cea960
@@ -22,7 +22,8 @@ import { css, styled } from '@apache-superset/core/ui';
|
||||
import { useSingleViewResource } from 'src/views/CRUD/hooks';
|
||||
import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon';
|
||||
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||
import { Input, CssEditor, Modal } from '@superset-ui/core/components';
|
||||
import { Input, Modal } from '@superset-ui/core/components';
|
||||
import { EditorHost } from 'src/core/editors';
|
||||
import { Typography } from '@superset-ui/core/components/Typography';
|
||||
import { OnlyKeyWithType } from 'src/utils/types';
|
||||
import { TemplateObject } from './types';
|
||||
@@ -46,7 +47,7 @@ const StyledCssTemplateTitle = styled.div(
|
||||
`,
|
||||
);
|
||||
|
||||
const StyledCssEditor = styled(CssEditor)`
|
||||
const StyledEditorHost = styled(EditorHost)`
|
||||
${({ theme }) => css`
|
||||
border-radius: ${theme.borderRadius}px;
|
||||
border: 1px solid ${theme.colorPrimaryBg};
|
||||
@@ -262,9 +263,11 @@ const CssTemplateModal: FunctionComponent<CssTemplateModalProps> = ({
|
||||
{t('css')}
|
||||
<span className="required">*</span>
|
||||
</div>
|
||||
<StyledCssEditor
|
||||
<StyledEditorHost
|
||||
id="css-template-editor"
|
||||
onChange={onCssChange}
|
||||
value={currentCssTemplate?.css}
|
||||
value={currentCssTemplate?.css ?? ''}
|
||||
language="css"
|
||||
width="100%"
|
||||
/>
|
||||
</TemplateContainer>
|
||||
|
||||
Reference in New Issue
Block a user