It is known that there is a wide class of quasi-two-dimensional graphenelike nanomaterials which in many respects can outperform graphene. So, here in addition to graphene, the attention is directed to stanene (buckled honeycomb structure) and phosphorene (puckered honeycomb structure). It is shown that, depending on the doping, these materials can have magnetically ordered edges. Computed diagrams of magnetic phases illustrate that, on the one hand, n-type doped narrow zigzag nanoribbons of graphene and stanene have antiferromagnetically aligned magnetic moments between the edges. On the other hand, however, in the case of phosphorene nanoribbons the zigzag edges can have ferromagnetically aligned magnetic moments for the p-type doping. The edge magnetism critically influences transport properties of the nanoribbons, and if adequately controlled can make them attractive for spintronics.