mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Add additional fields support for evernote plugin
Relates to Issue #2268 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:
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;
|
||||
|
Loading…
Reference in New Issue
Block a user