mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-24 00:50:28 +00:00
Allow field modules to specify HTML element tag used for editing
This commit is contained in:
parent
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user