Skip to content

Commit

Permalink
do also convert mulitline pasted value with separator
Browse files Browse the repository at this point in the history
  • Loading branch information
gmella committed May 20, 2024
1 parent ce18faa commit e132cf6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions modules/app.xql
Original file line number Diff line number Diff line change
Expand Up @@ -720,12 +720,18 @@ SIMBAD and Gaia DR3 catalogues are cross-matched though CDS and ESA data centers
</form>
<script>
document.querySelector('#identifiers').addEventListener('beforeinput', function (event) {{
// console.log(event);
if(event.inputType=="insertFromDrop"){{
if (event.data) {{
// console.log("dropped with content !!");
event.preventDefault();
event.srcElement.value=event.data.replace(/[\r\n]+/g, " ; ");
}}
}}
if(event.inputType=="insertFromPaste"){{
if (event.data) {{
event.preventDefault();
paste = event.data.replace(/[\r\n]+/g, " ; ");
old = event.srcElement.value;
event.srcElement.value=old.substring(0,event.srcElement.selectionStart ) + paste + old.substring(event.srcElement.selectionEnd,event.srcElement.value.size )
}}
}}
}});
Expand Down

0 comments on commit e132cf6

Please sign in to comment.