Skip to content

Commit

Permalink
Merge pull request #300 from desmosinc/eli/add-selection-method-to-st…
Browse files Browse the repository at this point in the history
…atic-math

add "select" and "clearSelection" methods to api for StaticMath fields
  • Loading branch information
eluberoff authored Aug 27, 2024
2 parents cff7177 + 05246dd commit 107e2c1
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/publicapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,14 @@ function getInterface(v: number): MathQuill.v3.API | MathQuill.v1.API {
selection() {
return this.__controller.exportLatexSelection();
}

select() {
this.__controller.selectAll();
return this;
}
clearSelection() {
this.__controller.cursor.clearSelection();
return this;
}
html() {
return this.__controller.root
.domFrag()
Expand Down Expand Up @@ -412,14 +419,6 @@ function getInterface(v: number): MathQuill.v3.API | MathQuill.v1.API {
if (ctrlr.blurred) cursor.hide().parent.blur(cursor);
return this;
}
select() {
this.__controller.selectAll();
return this;
}
clearSelection() {
this.__controller.cursor.clearSelection();
return this;
}

moveToDirEnd(dir: Direction) {
this.__controller
Expand Down

0 comments on commit 107e2c1

Please sign in to comment.