currentEditingValue method

String currentEditingValue({
  1. bool placeholderWhenEmpty = true,

Returns the current editing value (expression), which requires temporarily removing the cursor. When placeholderWhenEmpty is true, a TeX \Box is returned as a placeholder.


String currentEditingValue({bool placeholderWhenEmpty = true}) {
  // Store the expression as a TeX string.
  final expression = root.buildTeXString(
    // By passing null as the cursor color here, we are asserting
    // that the cursor is not part of the tree in a way.
    cursorColor: null,
    placeholderWhenEmpty: placeholderWhenEmpty,

  return expression;