This functions starts libreoffice, if it is in the PATH on POSIX systems (tested only on Linux). On Windows, consider using a shortcut including “-accept=socket,host=localhost,port=8100;urp;”.
Create a new libreoffice writer document
1 2 3 4 5  | 
file | 
 The file to create/open  | 
title | 
 The title of the document  | 
dir | 
 The directory to write the file to  | 
template | 
 The template file if to be used  | 
open | 
 Should file be opened if it already exists?  | 
overwrite | 
 Should file be overwritten if it already exists?  | 
sleep_time | 
 The time to sleep after starting LibreOffice before trying to connect  | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.