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

Allow exporting notes and notebooks

This commit is contained in:
Laurent Cozic
2017-08-20 16:29:18 +02:00
parent 1213819467
commit 671e8a3fc8
17 changed files with 273 additions and 23 deletions

View File

@ -51,6 +51,14 @@ class Note extends BaseItem {
return BaseModel.TYPE_NOTE;
}
static linkedResourceIds(body) {
// For example: ![](:/fcca2938a96a22570e8eae2565bc6b0b)
if (!body || body.length <= 32) return [];
const matches = body.match(/\(:\/.{32}\)/g);
if (!matches) return [];
return matches.map((m) => m.substr(3, 32));
}
static new(parentId = '') {
let output = super.new();
output.parent_id = parentId;