How to add/edit a DDF on Home assistant using text editor?

From that I have read here Hassos docker command not found - Configuration - Home Assistant Community

You need to be logged in as user hassio

Are you sure haven’t skipped this part ?

Either SSH & Web Terminal or some similar plugin, or just ssh root@{ip_address} -p 22222