Right, culled the script at
https://github.com/Jermolene/TiddlyDesktop/blob/master/source/js/utils/saving.js#L11-L46
(that
looked like the most promising one) down to this:
(function () {
try {
exports.enableSaving = function (doc, areBackupsEnabledFn,
loadFileTextFn) {
// Create the message box
var messageBox = doc.createElement("div");
messageBox.id = "tiddlyfox-message-box";
doc.body.appendChild(messageBox);
// Listen for save events
messageBox.addEventListener("tiddlyfox-save-file", function (
event) {
// Get the details from the message
var message = event.target,
filepath = message.getAttribute("data-tiddlyfox-path"),
content = message.getAttribute("data-tiddlyfox-content"
);
// Save the file
window.UWPWikiHandler.wikiSaved(content);
// Remove the message element from the message box
message.parentNode.removeChild(message);
// Send a confirmation message
var event = doc.createEvent("Events");
event.initEvent("tiddlyfox-have-saved-file", true, false);
event.savedFilePath = filepath;
message.dispatchEvent(event);
return false;
}, false);
}
} catch (e) {
}
})();
The Tie into the UWP app is window.UWPWikiHandler.wikiSaved(content); where
the app is passed the content string...
Fireworks in the app when I try to inject that chunk into the TiddlyWiki
page after navigation has succeeded. =Hard= Crash down to the OS inside the
debugger, not even a wink and a nod, just dies... I love UWP!
Too tired to keep trying with a teething girl, will see why that happens
next week.
*THANKS JEREMY for all your help, much obliged!*
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywikidev/a4a1f1d1-b8f6-4770-b591-54757bf3323f%40googlegroups.com.