1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Electron: Resolves #820: Allow dragging and dropping a note in another note to create a link

This commit is contained in:
Laurent Cozic
2018-09-30 20:15:30 +01:00
parent 0cd7ebf9d3
commit 6ea77b36ce
2 changed files with 23 additions and 2 deletions

View File

@ -663,7 +663,12 @@ class BaseItem extends BaseModel {
return super.save(o, options);
}
static markdownTag(item) {
static markdownTag(itemOrId) {
const item = typeof itemOrId === 'object' ? itemOrId : {
id: itemOrId,
title: '',
};
const output = [];
output.push('[');
output.push(markdownUtils.escapeLinkText(item.title));