একটি কাস্টম ইনপুট তৈরি করতে, আপনাকে সাবক্লাস Input বা এর একটি সাবক্লাস করতে হবে।
classMyInputextendsBlockly.inputs.Input{// The constructor should always take in a name and a block to be compatible// with JSON block definitions.constructor(name,block){super(name,block);// etc...}}
ঐচ্ছিকভাবে একটি সংযোগ তৈরি করুন
আপনি যদি চান যে আপনার ইনপুটটিতে একটি সংযোগ আছে, তাহলে makeConnection পদ্ধতিতে কল করে সেটি কনস্ট্রাক্টরে তৈরি করা উচিত।
[null,null,["2025-01-08 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["Subclass `Blockly.inputs.Input` to create a custom input, ensuring the constructor accepts a name and block for JSON compatibility."],["Optionally create a connection for the input using the `makeConnection` method within the constructor."],["Register the custom input with `Blockly.registry` to enable its usage in JSON block definitions, associating it with a unique string identifier."],["Custom inputs cannot replace built-in inputs, nor can custom JSON configuration be added to built-in inputs."]]],["To create a custom input, subclass the `Input` class, including a constructor that accepts a name and block. Optionally, create a connection within the constructor using the `makeConnection` method. To use the custom input in JSON block definitions, register it with `Blockly.registry.register`, associating it with a unique string. Note that unlike custom fields, built-in inputs cannot be overridden and do not accept custom JSON configurations.\n"]]