Skip to content

Commit

Permalink
change writing space logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ttop32 committed Nov 30, 2024
1 parent 18efe43 commit d74b5bd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/event/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ export function getSelectionText() {
export function getWindowSelection() {
var html = getWindowSelectionHtml();
var selectText = util.extractTextFromHtml(html);

// if no html format text , get as string
return selectText || _win.getSelection().toString();
var winText=_win?.getSelection()?.toString()
return winText || selectText ;
}

function getWindowSelectionHtml() {
Expand Down

0 comments on commit d74b5bd

Please sign in to comment.