Disable text editor app in public mode when logged in

This fixes #5059 by disabling the text editor app from the JS code,
because it's currently not possible to detect public mode from app.php

Please review @karlitschek @schiesbn @DeepDiver1975 @tomneedham