[{"id":"471bd01d-2c55-4895-b46f-811c4eed7571","tags":[{"product":null,"links":null,"id":"eb6fd2e9-402e-4d9d-941f-2f1d8e8d94a4","name":"Upd","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"da208fce-85ad-4c35-a5e3-87ff194b17ed","tags":[{"product":null,"links":null,"id":"eb6fd2e9-402e-4d9d-941f-2f1d8e8d94a4","name":"Upd","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"ac6cc2b2-6ddb-42d4-8bfa-95509e6448e2","tags":[{"product":null,"links":null,"id":"7b9720d8-a3f2-4aed-b5d1-ecdd9c83fd98","name":"New","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"99c67dff-427d-41b4-a4b0-144ec624500b","tags":[{"product":null,"links":null,"id":"eb6fd2e9-402e-4d9d-941f-2f1d8e8d94a4","name":"Upd","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"21d10235-4abe-486e-8859-6aa2f7edc442","tags":[{"product":null,"links":null,"id":"7b9720d8-a3f2-4aed-b5d1-ecdd9c83fd98","name":"New","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"361f2cdd-a34a-446b-8f53-16b7c82fb69a","tags":[{"product":null,"links":null,"id":"eb6fd2e9-402e-4d9d-941f-2f1d8e8d94a4","name":"Upd","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"2a3cece3-ed23-4e9f-a71f-226657337d2c","tags":[{"product":null,"links":null,"id":"eb6fd2e9-402e-4d9d-941f-2f1d8e8d94a4","name":"Upd","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"d8001871-044e-4afc-899d-e4104efcfbde","tags":[{"product":null,"links":null,"id":"eb6fd2e9-402e-4d9d-941f-2f1d8e8d94a4","name":"Upd","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"feb1cbab-9f1e-4233-b9db-11b2b9156c6d","tags":[{"product":null,"links":null,"id":"eb6fd2e9-402e-4d9d-941f-2f1d8e8d94a4","name":"Upd","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"a7942aeb-844b-42a6-83df-1c0aa8da3d0e","tags":[{"product":null,"links":null,"id":"7b9720d8-a3f2-4aed-b5d1-ecdd9c83fd98","name":"New","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"318074f6-ca29-4ed9-adb6-af319ab87121","tags":[{"product":null,"links":null,"id":"7b9720d8-a3f2-4aed-b5d1-ecdd9c83fd98","name":"New","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"3c29b05e-ef44-48c3-b836-6743680fa52a","tags":[{"product":null,"links":null,"id":"7b9720d8-a3f2-4aed-b5d1-ecdd9c83fd98","name":"New","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"5b86275f-ec58-4d09-b5c9-f0047fc3d2f3","tags":[{"product":null,"links":null,"id":"eb6fd2e9-402e-4d9d-941f-2f1d8e8d94a4","name":"Upd","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"55a78d7c-a608-4ff6-bb3c-f5993afc8631","tags":[{"product":null,"links":null,"id":"7b9720d8-a3f2-4aed-b5d1-ecdd9c83fd98","name":"New","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"64e9c9e5-dc70-4dcc-b101-824c175010f9","tags":[{"product":null,"links":null,"id":"7b9720d8-a3f2-4aed-b5d1-ecdd9c83fd98","name":"New","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]},{"id":"e7dd5528-b482-4399-9d5d-38d10a9b0ddb","tags":[{"product":null,"links":null,"id":"eb6fd2e9-402e-4d9d-941f-2f1d8e8d94a4","name":"Upd","color":"#4f3b88","productId":"615f7894-45c6-4170-bf0f-737df4b95179"}]}]
半角英数字、ひらがな、カタカナなど、入力を許可する文字種を限定するには、次の方法があります。
テキストコントロールと複数行テキストコントロールのformatプロパティに文字種を指定することで、コントロールに入力可能な文字種を制限することができます。
設定できるキーワードはデモの書式の設定を参照できます。
const gcTextBox = new InputMan.GcTextBox(document.getElementById('gcTextBox'), {
// 半角英数字のみ入力可能
format: 'A;a;9'
});
テキストコントロールと複数行テキストコントロールのsetFormatメソッドを使用することで、コントロールに入力可能な文字種を設定できます。
// 全角カタカナのみ入力可能
gcTextBox.setFormat('K');
テキストコントロールと複数行テキストコントロールのautoConvertプロパティをtrueに設定することで、入力された文字がformatプロパティで指定された文字種に自動的に変換されます。
const gcTextBox = new InputMan.GcTextBox(document.getElementById('gcTextBox'), {
format: 'A;a;9',
// 入力された文字が自動的に半角英数字に変換されます
autoConvert: true,
});
参考:テキストコントロール - 書式の設定