I have created a script to create ad hoc Jitsi meeting rooms in PHP.
The code below almost does what I want:
- Create a random Jitsi meeting ID
- When the user clicks "Copy meeting info" this ID is copied to my clipboard.
- It can then be inserted in any calendar invitation by using Ctrl+V.
However I am not able to figure out how to add a line break to the my info.
The code below results in :
This event is has a video call\r\nJoin here: https://meet.jit.si/acme111186700560c1f5750c38c
I have also tried PHP_EOL instead of '\r\n' but it still does not work.
Additional information:
My problem could also be described like this:
Is it possible to modify this code to add multiple lines of text to the clipboard instead of just one line of text.
This is the code I have now:
<?php
$meeting = "https://meet.jit.si/acme" . rand() . uniqid();
?>
<div>
Your meeting room:<br><br>
</div>
<!-- The text field -->
<input type="text" value="<?php echo 'This event is has a video call' . '\r\n' . 'Join here: ' . $meeting;?>" id="myInput">
<br><br>
<!-- The button used to copy the text -->
<button onclick="myFunction()">Copy meeting room info</button>