diff --git a/packages/app/src/components/views/Field/index.tsx b/packages/app/src/components/views/Field/index.tsx index a0a81dd7dd..fb326f7348 100644 --- a/packages/app/src/components/views/Field/index.tsx +++ b/packages/app/src/components/views/Field/index.tsx @@ -20,6 +20,15 @@ marked.setOptions({ breaks: true, }); +const renderer = new marked.Renderer(); +renderer.link = ( href, title, text ) => `${ text }`; + +function markdown(text: string) { + return marked(text, { + renderer, + }); +} + const InterfaceTypes = new Map(); function registerFieldComponent(type, Component) { @@ -65,12 +74,12 @@ export function TextareaField(props: any) { return null; } if (viewType !== 'table') { - return
; + return
; } if (value.length > 20) { return ( e.stopPropagation()} className={'textarea-field-content'} style={{maxWidth: 300}} dangerouslySetInnerHTML={{__html: marked(value)}}/> +
e.stopPropagation()} className={'textarea-field-content'} style={{maxWidth: 300}} dangerouslySetInnerHTML={{__html: markdown(value)}}/> )}>{value.substring(0, 15)}... ); }