mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +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
|
// Get all the "note" nodes
|
||||||
var noteNodes = doc.querySelectorAll("note");
|
var noteNodes = doc.querySelectorAll("note");
|
||||||
$tw.utils.each(noteNodes,function(noteNode) {
|
$tw.utils.each(noteNodes,function(noteNode) {
|
||||||
results.push({
|
var result = {
|
||||||
title: noteNode.querySelector("title").textContent,
|
title: noteNode.querySelector("title").textContent,
|
||||||
type: "text/html",
|
type: "text/html",
|
||||||
text: noteNode.querySelector("content").textContent
|
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 the output tiddlers
|
||||||
return results;
|
return results;
|
||||||
|
Loading…
Reference in New Issue
Block a user