is there a possibility to use the math formula editor (or something else to edit math formulas) as a component in the web portal? I have the requirement that my user must enter and edit math formula in the web space.

unfortunately, there is no such functionality available out-of-the-box in KNIME. What you can try instead is to generate your own composite view, in which you would let the user to do some restricted set of operations on data columns and variables. For example, you can use https://kni.me/n/WnzwWz3JZAAP6dCG
to simplify discovery of columns and variables and provide a list of supported functions with a single selection node.