1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-01 16:26:57 +00:00

Add additional fields support for evernote plugin

Relates to Issue 

Add the additional field defined in the XML as properties to the result.
This also appears to capture the 'author' field.
This commit is contained in:
Devin Weaver 2016-02-04 18:31:24 -05:00
parent 8904a6dba6
commit 1d35087f29

@ -34,11 +34,15 @@ exports["application/enex+xml"] = function(text,fields) {
// Get all the "note" nodes
var noteNodes = doc.querySelectorAll("note");
$tw.utils.each(noteNodes,function(noteNode) {
results.push({
var result = {
title: noteNode.querySelector("title").textContent,
type: "text/html",
text: noteNode.querySelector("content").textContent
};
$tw.utils.each(noteNodes.querySelector("note-attributes").childNodes,function(attrNode) {
result[attrNode.tagName] = attrNode.textContent;
});
results.push(result);
});
// Return the output tiddlers
return results;