mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-13 22:07:15 +00:00
Add banner for binary tiddlers in edit mode
Makes it easier to add tags to a binary tiddler (eg a PDF).
This commit is contained in:
@@ -56,7 +56,15 @@ EditWidget.prototype.execute = function() {
|
||||
}
|
||||
type = type || "text/vnd.tiddlywiki";
|
||||
// Choose the appropriate edit widget
|
||||
var editorType = this.wiki.getTiddlerText(EDITOR_MAPPING_PREFIX + type) || "text";
|
||||
var editorType = this.wiki.getTiddlerText(EDITOR_MAPPING_PREFIX + type);
|
||||
if(!editorType) {
|
||||
var typeInfo = $tw.config.contentTypeInfo[type];
|
||||
if(typeInfo && typeInfo.encoding === "base64") {
|
||||
editorType = "binary";
|
||||
} else {
|
||||
editorType = "text";
|
||||
}
|
||||
}
|
||||
// Make the child widgets
|
||||
this.makeChildWidgets([{
|
||||
type: "edit-" + editorType,
|
||||
|
||||
Reference in New Issue
Block a user