Skip to main content
Explain difference
Source Link
Carl Woll
  • 131.7k
  • 6
  • 246
  • 359

You could also use InputAliases. For example:

CurrentValue[EvaluationNotebook[], InputAliases] = {
    "fr" -> FrameBox[
        "\[SelectionPlaceholder]",
        BaselinePosition->Baseline,
        Background->LightGray
    ],
    ParentList
};

Here is a short animation using the alias:

enter image description here

Addendum

The nice thing about this approach compared to the accepted answer is that the added frame is transparent to the evaluation process. Here's an animation comparing the two approaches:

enter image description here

Explanation

One further comment. The difference between the two cases is that the evaluate in place approach used Framed, which by default has the option StripOnInput->False. Using:

10 == Framed[Defer[11-1], StripOnInput->True]

would produce a wrapper that is transparent to evaluation

You could also use InputAliases. For example:

CurrentValue[EvaluationNotebook[], InputAliases] = {
    "fr" -> FrameBox[
        "\[SelectionPlaceholder]",
        BaselinePosition->Baseline,
        Background->LightGray
    ],
    ParentList
};

Here is a short animation using the alias:

enter image description here

Addendum

The nice thing about this approach compared to the accepted answer is that the added frame is transparent to the evaluation process. Here's an animation comparing the two approaches:

enter image description here

You could also use InputAliases. For example:

CurrentValue[EvaluationNotebook[], InputAliases] = {
    "fr" -> FrameBox[
        "\[SelectionPlaceholder]",
        BaselinePosition->Baseline,
        Background->LightGray
    ],
    ParentList
};

Here is a short animation using the alias:

enter image description here

Addendum

The nice thing about this approach compared to the accepted answer is that the added frame is transparent to the evaluation process. Here's an animation comparing the two approaches:

enter image description here

Explanation

One further comment. The difference between the two cases is that the evaluate in place approach used Framed, which by default has the option StripOnInput->False. Using:

10 == Framed[Defer[11-1], StripOnInput->True]

would produce a wrapper that is transparent to evaluation

Add comparison
Source Link
Carl Woll
  • 131.7k
  • 6
  • 246
  • 359

You could also use InputAliases. For example:

CurrentValue[EvaluationNotebook[], InputAliases] = {
    "fr" -> FrameBox[
        "\[SelectionPlaceholder]",
        BaselinePosition->Baseline,
        Background->LightGray
    ],
    ParentList
};

Here is a short animation using the alias:

enter image description here

Addendum

The nice thing about this approach compared to the accepted answer is that the added frame is transparent to the evaluation process. Here's an animation comparing the two approaches:

enter image description here

You could also use InputAliases. For example:

CurrentValue[EvaluationNotebook[], InputAliases] = {
    "fr" -> FrameBox[
        "\[SelectionPlaceholder]",
        BaselinePosition->Baseline,
        Background->LightGray
    ],
    ParentList
};

Here is a short animation using the alias:

enter image description here

You could also use InputAliases. For example:

CurrentValue[EvaluationNotebook[], InputAliases] = {
    "fr" -> FrameBox[
        "\[SelectionPlaceholder]",
        BaselinePosition->Baseline,
        Background->LightGray
    ],
    ParentList
};

Here is a short animation using the alias:

enter image description here

Addendum

The nice thing about this approach compared to the accepted answer is that the added frame is transparent to the evaluation process. Here's an animation comparing the two approaches:

enter image description here

Source Link
Carl Woll
  • 131.7k
  • 6
  • 246
  • 359

You could also use InputAliases. For example:

CurrentValue[EvaluationNotebook[], InputAliases] = {
    "fr" -> FrameBox[
        "\[SelectionPlaceholder]",
        BaselinePosition->Baseline,
        Background->LightGray
    ],
    ParentList
};

Here is a short animation using the alias:

enter image description here