File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 121121 < div class ="dropdown-item ">
122122 < div style ="display: flex; ">
123123 < div style ="margin: 5px; ">
124- < button class ="button is-small is-primary " onclick ="findAndReplace() "> Replace</ button >
124+ < button class ="button is-small is-primary " id =" replaceButton " onclick ="findAndReplace() "> Replace</ button >
125125 </ div >
126126
127127 < div style ="margin: 5px; ">
128- < button class ="button is-small is-primary " onclick ="findAndReplace(true) "> Replace All</ button >
128+ < button class ="button is-small is-primary " id =" replaceAllButton " onclick ="findAndReplace(true) "> Replace All</ button >
129129 </ div >
130130 </ div >
131131 </ div >
Original file line number Diff line number Diff line change @@ -101,6 +101,14 @@ function findAndReplace(all = false) {
101101 }
102102}
103103
104+ document . getElementById ( "replaceTerm" )
105+ . addEventListener ( "keyup" , function ( event ) {
106+ event . preventDefault ( ) ;
107+ if ( event . key === "Enter" ) {
108+ document . getElementById ( "replaceButton" ) . click ( ) ;
109+ }
110+ } ) ;
111+
104112// this function is activated on mouseup after user has highlighted text
105113function addShareTool ( a , previousSelection ) {
106114 // if annotation mode on
You can’t perform that action at this time.
0 commit comments