Insert custom snippet in editor