You can copy everything until \begin{document}, in both cases, from View > View Source... > Complete source
or just export your documents to .tex and copy from there.
You can copy everything until \begin{document}, in both cases, from View > View Source... > Complete source
or just export your documents to .tex and copy from there.