Edit other (Text-) file formats

As you know editing .txt files in Seafile is rather easy.
Also Markdown (.md) works well.

I would like to edit .tex files, too. They are just plain text files containing LaTex (or other TeX) code.
Is there a config file or similar that allows editin tex files like normal txt files? Would be great. I don’t really like renaming all tex to txt and back. It destroys the history (I think – never proofed).


Which version of server are you using? I found the pro-6.0.13 can edit the .tex file.

Otherwise, you may edit the file
and modify the struct “PREVIEW_FILEEXT” to include the tex in the “TEXT”.

1 Like

I am not using the Pro-Version (even though I could).
But I guess it is the same with the non-pro-version?
I will check during the next days. I have to update anyhow :smiley:

Thanks for the hint.

.tex file extension is already included in the PREVIEW_FILEEXT struct in seahub/seahub/utils/init.py . At least in 6.0.9 version.

I’ve modified this variable to add more plain-text file extensions. Will those disappear once I upgrade the server?

Yes, unfortunately.

I don’t know if these settings remain after an upgrade, but I think they are stored in the database and it’s worth a try:

In Seafile Server 6.1.1 CE open the web interface:

Go to “System Admin” -> “Settings” -> Nearly at the bottom you find “Preview File Extensions”
Here you can enter your file extension.

Hope it helps.

Lol I didn’t know that option was there. Thanks!