A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
core: include tags in exported note (#1345)
Muhammad Ali82b584b3d1b4
diff --git a/packages/core/models/note.js b/packages/core/models/note.jsindex b04ad8185..e1d63ff98 100644--- a/packages/core/models/note.js+++ b/packages/core/models/note.js@@ -89,7 +89,8 @@ export default class Note {title: this.title,editedOn: this.dateEdited,headline: this.headline,- createdOn: this.data.dateCreated+ createdOn: this.data.dateCreated,+ tags: this.tags.join(", ")};const contentItem = await this._db.content.raw(this._note.contentId);if (!contentItem) return false;diff --git a/packages/core/utils/templates/helper.js b/packages/core/utils/templates/helper.jsindex 0d8464e5e..459ee4d2b 100644--- a/packages/core/utils/templates/helper.js+++ b/packages/core/utils/templates/helper.js@@ -37,7 +37,7 @@ function generateMetaTags(metadata, createMetaTag) {export function buildPage(template,createMetaTag,- { metadata, title, headline, content, createdOn, editedOn }+ { metadata, title, headline, content, createdOn, editedOn, tags }) {let page = template;@@ -52,5 +52,6 @@ export function buildPage(page = page.replace(/{{content}}/g, content);page = page.replace(/{{createdOn}}/g, formatDate(createdOn));page = page.replace(/{{editedOn}}/g, formatDate(editedOn));+ page = page.replace(/{{tags}}/g, tags);return page;}diff --git a/packages/core/utils/templates/html/template.js b/packages/core/utils/templates/html/template.jsindex 18bc53149..b7a9ca0e9 100644--- a/packages/core/utils/templates/html/template.js+++ b/packages/core/utils/templates/html/template.js@@ -26,14 +26,14 @@ const template = `<!DOCTYPE html>name="description"content="{{headline}}"/>- <title>{{title}} - Notesnook</title>+ <title>{{title}} - Notesnook</title>+ <meta name="created-on" content="{{createdOn}}" />+ <meta name="last-edited-on" content="{{editedOn}}" />+ <meta name="tags" content="{{tags}}" /></head><body><h1>{{title}}</h1>{{content}}- <br/>- Created on: <b>{{createdOn}}</b><br/>- Edited on: <b>{{editedOn}}</b></body></html>`;diff --git a/packages/core/utils/templates/markdown/template.js b/packages/core/utils/templates/markdown/template.jsindex 0369ba4cc..d56ff1843 100644--- a/packages/core/utils/templates/markdown/template.js+++ b/packages/core/utils/templates/markdown/template.js@@ -22,7 +22,5 @@ const template = `# {{title}}{{content}}----_Created on: {{createdOn}}_--_Edited on: {{editedOn}}_`;+_Tags: {{tags}}_`;export default template;diff --git a/packages/core/utils/templates/text/template.js b/packages/core/utils/templates/text/template.jsindex 3a7188cd5..0f09a23d5 100644--- a/packages/core/utils/templates/text/template.js+++ b/packages/core/utils/templates/text/template.js@@ -23,7 +23,6 @@ const template = `{{title}}{{content}}-----------Created on: {{createdOn}}-Edited on: {{editedOn}}`;+Tags: {{tags}}`;export default template;