I'm trying to create a notebook where a user can enter a Mathematica expression, and its syntax is analyzed (number of tokens, compressed size, etc.).
Trying this answer,
CellPrint@TextCell[
Row[{"This is an inline cell with automatic syntax highlighting: ",
ExpressionCell[Dynamic@input, "Notebook", "Input",
CellFrame -> True]}], "Text"]
Dynamic@input
the Dynamic doesn't update input. If I make an InputField inside the ExpressionCell the syntax highlighting doesn't apply, even if I change the BaseStyle. How can I get both dynamic behavior and syntax highlighting?

MakeExpressionfails and generatesErrorBoxes; this is frustrating because the user cannot paste in input or add whitespace. Is there a way around that? – lirtosiast Jun 08 '19 at 05:54StripBoxesto be less strict about the content. – Kuba Jun 08 '19 at 06:24