The goal of the present paper is to study an extension problem of a connected preserving (for short, $CP-$) map between Khalimsky ($K-$ for brevity, if there is no ambiguity) spaces. As a generalization of a $K$-continuous map, for $K$-topological spaces the recent paper [13] develops a function sending connected sets to connected ones (for brevity, an $A$-map: see Definition 3.1 in the present paper). Since this map plays an important role in applied topology including digital topology, digital geometry and mathematical morphology, the present paper studies an extension problem of a $CP$-map in terms of both an $A$-retract and an $A$-isomorphism (see Example 5.2). Since $K$-topological spaces have been often used for studying digital images, this extension problem can contribute to a certain areas of computer science and mathematical morphology.