Refactor extract insertTimestamp logic into Editor