Contrasting interedge superexchange interactions of graphene nanoribbons embedded in h-BN and graphane