({{, (RefLink[CellEvaluationFunction, paclet:ref/CellEvaluationFunction])
is an option for (RefLink[Cell, paclet:ref/Cell]) that gives a function to be applied to every expression from the cell that is sent to the kernel for ordinary evaluation. }})

OpenersNotesSection(Spacer1)Details

(RefLink[CellEvaluationFunction, paclet:ref/CellEvaluationFunction]) is used for all ordinary kernel evaluations, as initiated, for example, by (Key1[shift, MacOSXreturnenter]) or Evaluate in Place.

It is not used for evaluations associated with (RefLink[Dynamic, paclet:ref/Dynamic]) objects.

In a (RefLink[StandardForm, paclet:ref/StandardForm]) or (RefLink[TraditionalForm, paclet:ref/TraditionalForm]) cell, (RefLink[CellEvaluationFunction, paclet:ref/CellEvaluationFunction]) is applied to the (RefLink[BoxData, paclet:ref/BoxData]) expression representing the input to be evaluated.

In an (RefLink[InputForm, paclet:ref/InputForm]) cell, it is applied to the string corresponding to the input to be evaluated.

With (RefLink[CellEvaluationFunction, paclet:ref/CellEvaluationFunction])->f and (RefLink[$PreRead, paclet:ref/$PreRead])=g, the object processed by the kernel will be g[f[data]].

The default setting is (RefLink[CellEvaluationFunction, paclet:ref/CellEvaluationFunction])->(RefLink[Identity, paclet:ref/Identity]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

CellPrint[ExpressionCell[x,"Input",CellEvaluationFunction->(Style[ToExpression[#]^2,Red]&)]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[$Pre, paclet:ref/$Pre])  ▪  (RefLink[$PreRead, paclet:ref/$PreRead])  ▪  (RefLink[$Post, paclet:ref/$Post])  ▪  (RefLink[CellProlog, paclet:ref/CellProlog])  ▪  (RefLink[CellEpilog, paclet:ref/CellEpilog])  ▪  (RefLink[Cell, paclet:ref/Cell])  ▪  (RefLink[Evaluator, paclet:ref/Evaluator])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Evaluation Options in Notebooks, paclet:guide/EvaluationOptionsInNotebooks])}})}})