Benutzerdefinierte Eingaben erstellen
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Um eine benutzerdefinierte Eingabe zu erstellen, müssen Sie eine Unterklasse von Input oder einer der
ihre abgeleiteten Klassen.
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...}}
Optional: Verbindung erstellen
Wenn Ihre Eingabe eine Verbindung haben soll, erstellen Sie sie im
-Konstruktor durch Aufrufen der Methode makeConnection.
[null,null,["Zuletzt aktualisiert: 2025-07-25 (UTC)."],[],["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"]]