Skip to content

Commit e386c01

Browse files
authored
Merge pull request #78 from OneNoteDev/bug/make-long-citations-readable-copyable
[Bug] Make long citations copy-able/fully readable
2 parents 2d935d9 + f1d507c commit e386c01

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/scripts/clipperUI/components/previewViewer/bookmarkPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class BookmarkPreview extends PreviewComponentBase<{}, ClipperStateProp> {
9999
{ this.renderTitleIfExists(result.title) }
100100
<tr>
101101
<td style={urlTdStyle}>
102-
<a href={url} target="_blank">{url}</a>
102+
<a href={url} target="_blank" title={url}>{url}</a>
103103
</td>
104104
</tr>
105105
{ this.renderDescriptionIfExists(result.description) }

src/scripts/clipperUI/components/previewViewer/previewComponentBase.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ export abstract class PreviewComponentBase<TState, TProps extends ClipperStatePr
7070
}
7171

7272
private getPreviewSubtitle(): any {
73-
let sourceUrlCitation = Localization.getLocalizedString("WebClipper.FromCitation")
74-
.replace("{0}", this.props.clipperState.pageInfo ? this.props.clipperState.pageInfo.rawUrl : "");
73+
let sourceUrlCitationPrefix = Localization.getLocalizedString("WebClipper.FromCitation")
74+
.replace("{0}", ""); // TODO can we change this loc string to remove the {0}?
75+
76+
let sourceUrl = this.props.clipperState.pageInfo ? this.props.clipperState.pageInfo.rawUrl : "";
7577

7678
return (
7779
<div id={Constants.Ids.previewSubtitleContainer}>
@@ -80,7 +82,8 @@ export abstract class PreviewComponentBase<TState, TProps extends ClipperStatePr
8082
: undefined}
8183
{this.props.clipperState.currentMode.get() !== ClipMode.Bookmark
8284
? <div id={Constants.Ids.previewUrlContainer}>
83-
{sourceUrlCitation}
85+
{sourceUrlCitationPrefix}
86+
<a href={sourceUrl} target="_blank" title={sourceUrl}>{sourceUrl}</a>
8487
</div>
8588
: undefined}
8689
</div>

0 commit comments

Comments
 (0)