1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-03-13 06:58:09 +00:00

Allow text editor type=color for colours not in hex RGB format

See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color#value
This commit is contained in:
Jeremy Ruston 2025-01-25 11:03:53 +00:00
parent 0dfde0660a
commit 7513e4426c

View File

@ -91,6 +91,9 @@ Update the DomNode with the new text
*/
SimpleEngine.prototype.updateDomNodeText = function(text) {
try {
if(this.widget.editType === "color") {
text = $tw.utils.convertRGBStringToCSSColor(text);
}
this.domNode.value = text;
} catch(e) {
// Ignore