Skip to content

Commit

Permalink
Merge pull request #145 from garrylachman/138-markdown-links
Browse files Browse the repository at this point in the history
* Added style properties to MarkdownEditor.Markdown component to make it non-editable and to add pointerEvents and cursor.
  • Loading branch information
garrylachman authored Feb 26, 2023
2 parents d267f4f + c4f6a14 commit 88d9fa9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ export const ColumnDocumentation = () => {

const RenderPreview = () => (
<Box p={4}>
<MarkdownEditor.Markdown source={markdown} />
<MarkdownEditor.Markdown
style={{
pointerEvents: 'none',
cursor: 'default',
}}
source={markdown}
/>
</Box>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ export const TabeDocumentation = () => {

const RenderPreview = () => (
<Box p={4}>
<MarkdownEditor.Markdown source={markdown} />
<MarkdownEditor.Markdown
style={{
pointerEvents: 'none',
cursor: 'default',
}}
source={markdown}
/>
</Box>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ export const ColumnDocumentation: FC<ColumnDocumentationProperties> = ({
<Heading>Column: {columnState?.name}</Heading>
<>
{columnState?.metadata.md ? (
<MarkdownEditor.Markdown source={columnState?.metadata.md} />
<MarkdownEditor.Markdown
style={{
pointerEvents: 'none',
cursor: 'default',
}}
source={columnState?.metadata.md}
/>
) : (
<Text>No table documentation found</Text>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export const TableDocumentation = () => {
<Heading>Table: {viewState?.name}</Heading>
{viewState?.metadata.md ? (
<MarkdownEditor.Markdown
style={{
pointerEvents: 'none',
cursor: 'default',
}}
source={viewState?.metadata.md}
// @ts-ignore
pluginsFilter={(name, value) => {
Expand Down

0 comments on commit 88d9fa9

Please sign in to comment.