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?