Modified for working like Editor