kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Allow field modules to specify HTML element tag used for editing
rodzic
e5b66a08bf
commit
69888e6701
|
@ -700,6 +700,7 @@ $tw.modules.define("$:/boot/tiddlerfields/created","tiddlerfield",{
|
|||
});
|
||||
$tw.modules.define("$:/boot/tiddlerfields/color","tiddlerfield",{
|
||||
name: "color",
|
||||
editTag: "input",
|
||||
editType: "color"
|
||||
});
|
||||
$tw.modules.define("$:/boot/tiddlerfields/tags","tiddlerfield",{
|
||||
|
|
|
@ -122,6 +122,9 @@ EditTextWidget.prototype.execute = function() {
|
|||
} else {
|
||||
tag = "input";
|
||||
var fieldModule = $tw.Tiddler.fieldModules[this.editField];
|
||||
if(fieldModule && fieldModule.editTag) {
|
||||
tag = fieldModule.editTag;
|
||||
}
|
||||
if(fieldModule && fieldModule.editType) {
|
||||
type = fieldModule.editType;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue