A new family of π-conjugated polyketanils was synthesized and thermal and optical properties of the polymers were tuned by 'chain engineering', consisting of the appropriate design of chain building blocks using diamines and diketones with various chemical structures, and 'dopant engineering' in which a specially designed multifunctional dopant was used, 1,2-(di-2-ethylhexyl) ester of 4-sulfophthalic acid, capable of specific interaction with the host polymer. The structure of the dopant creates a new type of supramolecular comb-shaped architecture in which the lateral groups, anions of the sulfophthalic acid residue, are ionically bonded to the main chain via protonation of ketimine nitrogen atoms. This specific interaction of the dopant with the host polymer influences the polyketanils' properties and the following changes were observed: decreasing glass transition temperature and improvement of polymer film flexibility, as well as a bathochromic shift of the photoluminescence emission band.