Slightly different logic. Inserting content is the special case for closing source editor