Skip to content

Commit

Permalink
feat: add edit icon for multiple render for #184
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed May 9, 2020
1 parent 82c7978 commit 7d5724a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="right-content" #render (scroll)="handleScroll($event)">
<div class="editit" *ngIf="sourceDir">
<a [href]="baseUrl + sourceDir" target="_blank">
<mat-icon (click)="openLink()">edit</mat-icon>
<mat-icon>edit</mat-icon>
</a>
</div>
<ledge-render [content]="data" *ngIf="data"
Expand All @@ -27,6 +27,11 @@
</div>

<div *ngIf="!showToc" class="no-toc-markdown" #render (scroll)="handleScroll($event)">
<div class="editit" *ngIf="sourceDir">
<a [href]="baseUrl + sourceDir" target="_blank">
<mat-icon>edit</mat-icon>
</a>
</div>
<ledge-render [content]="data" *ngIf="data"></ledge-render>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,4 @@ export class LedgeMarkdownRenderComponent
const menuElement = document.getElementById(headingId);
this.scrollToMenu(menuElement, id);
}

openLink() {
window.open(this.baseUrl + this.sourceDir);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
</ul>
</mat-drawer>
<mat-drawer-content #drawerContent>
<ledge-markdown-render [data]="content"></ledge-markdown-render>
<ledge-markdown-render
sourceDir="{{urlPrefix}}/{{source}}.md"
[data]="content">
</ledge-markdown-render>
</mat-drawer-content>
</mat-drawer-container>

0 comments on commit 7d5724a

Please sign in to comment.