Expression Editor Pro is a reusable Reactive Web block for building mathematical and business expressions without hand-typing everything. Users compose formulas from predefined inputs, rate tables, operators and numeric constants. Typing is fully supported, with autocomplete and live validation. It was designed for rating and pricing scenarios, such as insurance premium formulas, but works for any calculation rule.
Editor
Autocomplete
Validation
A + B × C
A + (B × C)
Expression = Term (( + | - ) Term)* Term = Factor (( × | ÷ ) Factor)* Factor = Number | Identifier | ( Expression )
* and / are accepted and normalised to × and ÷. Identifiers are case-sensitive and may contain letters, digits and underscores.
*
/
FormulaText
BuildingContentRate × ContentsSI
InitialFormula
Replace(Replace(FormulaText, "×", "*"), "÷", "/")
FormulaBuilderLib.Parser.toAscii(text)
FormulaBuilderLib.Parser.toJson(text)
{"version":1,"formula":"A + B × C","formulaAscii":"A + B * C","valid":true,"ast":{...}}
FormulaBuilderLib.Parser.fromJson(value)
A × -5