An m-uniform quantum state on n qubits is an entangled state in which every m-qubit subsystem is maximally mixed. Starting with an m-uniform state realized as the graph state associated with an m-regular graph, and a classical n,k,d≥m+1 binary linear code with certain additional properties, we show that pure [n,k,m+1]]2 quantum error-correcting codes (QECCs) can be constructed within the codeword stabilized (CWS) code framework. As illustrations, we construct pure [[22r-1,22r-2r-3,3]]2 and [[(24r-1)2,(24r-1)2-32r-7,5]]2 QECCs. We also give measurement-based protocols for encoding into code states and for recovery of logical qubits from code states.