improve editing and markdown rendering