blockly > utils > extensions > buildTooltipWithFieldText

utils.extensions.buildTooltipWithFieldText() function

Builds an extension function that will install a dynamic tooltip. The tooltip message should include the string '%1' and that string will be replaced with the text of the named field.


export declare function buildTooltipWithFieldText(msgTemplate: string, fieldName: string): (this: Block) => void;


Parameter Type Description
msgTemplate string The template form to of the message text, with %1 placeholder.
fieldName string The field with the replacement text.


(this: Block) => void

The extension function.