Closed geek-merlin closed 1 year ago
I noticed that drawio has success in this so groked the code that does the job. Maybe this helps.
$.each(OCA.DrawIO.Mimes, function (ext, attr) {
fileList.fileActions.registerAction({
name: "drawioOpen",
displayName: t(OCA.DrawIO.AppName, "Open in Draw.io"),
mime: attr.mime,
permissions: OC.PERMISSION_READ | OC.PERMISSION_UPDATE,
icon: function () {
return OC.imagePath(OCA.DrawIO.AppName, "btn-edit");
},
iconClass: "icon-drawio-xml",
actionHandler: function (fileName, context) {
var dir = fileList.getCurrentDirectory();
OCA.DrawIO.EditFileNewWindow(OC.joinPaths(dir, fileName));
}
});
if ((fileList.fileActions.getDefaultFileAction(attr.mime, "file", OC.PERMISSION_READ) == false) || (OCA.AppSettings.overrideXml == "yes")) {
fileList.fileActions.setDefault(attr.mime, "drawioOpen");
}
});
OTOH the markdown editor seems to kick itself in as a preview handler:
$(document).ready(function () {
if (OCA.Files_Texteditor && OCA.Files_Texteditor.registerPreviewPlugin) {
OCA.Files_Texteditor.registerPreviewPlugin('text/markdown', previewPlugin);
}
});
Maybe someone can find and share a link to the developer documentation (or a thread in the discussion forum) about how to deal with this issue best.
This issue should now be fixed with 3620bde4ab35629551c64630a8332b1d8a0319c6 (not yet released).
Pads are not associated with ownpad.
There is a workaround in the readme introduced in #3. This requires editing a config file so is not feasible for managed fooCloud hosting.
Some former code did it in a way that broke other stuff. The problem is also mentioned in #5 which may or may not be ralated.