mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:37:37 +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);
|
||||
const content = (
|
||||
<EllipsisWithTooltip ellipsis={ellipsis} popoverContent={autop ? html : value}>
|
||||
{ellipsis ? text || value : html}
|
||||
</EllipsisWithTooltip>
|
||||
);
|
||||
const content = ellipsis ?
|
||||
(<EllipsisWithTooltip ellipsis={ellipsis} popoverContent={autop ? html : value}>
|
||||
{text}
|
||||
</EllipsisWithTooltip>) : value || html;
|
||||
return (
|
||||
<div className={cls(prefixCls, props.className)} style={props.style}>
|
||||
{props.addonBefore}
|
||||
|
@ -20,8 +20,8 @@ export const Markdown: any = connect(
|
||||
}),
|
||||
mapReadPretty((props) => {
|
||||
let text = convertToText(props.value);
|
||||
let value = <div className={'nb-markdown'} dangerouslySetInnerHTML={{ __html: markdown(text) }} />;
|
||||
return <InputReadPretty.TextArea {...props} text={text} value={value} />;
|
||||
let value = <div className={'nb-markdown'} dangerouslySetInnerHTML={{ __html: markdown(props.value) }} />;
|
||||
return <InputReadPretty.TextArea {...props} autop={false} text={text} value={value} />;
|
||||
}),
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user