mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 16:15:44 +00:00
fix: markdown component (#469)
This commit is contained in:
parent
d6d14459ed
commit
7760cd0891
@ -44,11 +44,10 @@ ReadPretty.TextArea = (props) => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
console.log('value', value);
|
console.log('value', value);
|
||||||
const content = (
|
const content = ellipsis ?
|
||||||
<EllipsisWithTooltip ellipsis={ellipsis} popoverContent={autop ? html : value}>
|
(<EllipsisWithTooltip ellipsis={ellipsis} popoverContent={autop ? html : value}>
|
||||||
{ellipsis ? text || value : html}
|
{text}
|
||||||
</EllipsisWithTooltip>
|
</EllipsisWithTooltip>) : value || html;
|
||||||
);
|
|
||||||
return (
|
return (
|
||||||
<div className={cls(prefixCls, props.className)} style={props.style}>
|
<div className={cls(prefixCls, props.className)} style={props.style}>
|
||||||
{props.addonBefore}
|
{props.addonBefore}
|
||||||
|
@ -20,8 +20,8 @@ export const Markdown: any = connect(
|
|||||||
}),
|
}),
|
||||||
mapReadPretty((props) => {
|
mapReadPretty((props) => {
|
||||||
let text = convertToText(props.value);
|
let text = convertToText(props.value);
|
||||||
let value = <div className={'nb-markdown'} dangerouslySetInnerHTML={{ __html: markdown(text) }} />;
|
let value = <div className={'nb-markdown'} dangerouslySetInnerHTML={{ __html: markdown(props.value) }} />;
|
||||||
return <InputReadPretty.TextArea {...props} text={text} value={value} />;
|
return <InputReadPretty.TextArea {...props} autop={false} text={text} value={value} />;
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user