Skip to content

Commit

Permalink
TSVB: Option to open links in new tab (#31906) (#32006)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwizp authored Feb 26, 2019
1 parent 422a7ca commit 7f7f48b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,22 @@ class MarkdownPanelConfigUi extends Component {
onChange={this.props.onChange}
/>
</EuiFlexItem>

<EuiFlexItem grow={false}>
<EuiFormLabel style={{ marginBottom: 0 }}>
<FormattedMessage
id="tsvb.markdown.optionsTab.openLinksInNewTab"
defaultMessage="Open links in new tab?"
/>
</EuiFormLabel>
</EuiFlexItem>
<EuiFlexItem>
<YesNo
value={model.markdown_openLinksInNewTab}
name="markdown_openLinksInNewTab"
onChange={this.props.onChange}
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiFormLabel style={{ marginBottom: 0 }} htmlFor={htmlId('valign')}>
<FormattedMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ function MarkdownVisualization(props) {
{markdownError && <ErrorComponent error={markdownError} />}
<style type="text/css">{markdownCss}</style>
<div className={contentClasses}>
<div id={markdownElementId}>{!markdownError && <Markdown markdown={markdownSource} />}</div>
<div id={markdownElementId}>
{ !markdownError && <Markdown markdown={markdownSource} openLinksInNewTab={model.markdown_openLinksInNewTab} /> }
</div>
</div>
</div>
);
Expand Down

0 comments on commit 7f7f48b

Please sign in to comment.