The invention relates to a cross-linkable polymer comprising a base polymer comprising functional groups at least some of which have been reacted with a first organic molecule comprising a cross-linkable unit and with a second organic molecule capable of bonding to organic and/or inorganic substrates. The invention further relates to a hydrogel comprising the cross-linkable polymer that comprises cross-linkable polymer strands, wherein at least some of the cross-linkable units of different cross-linkable polymer strands have reacted to form a covalent bond thereby forming a covalently linked network. The invention further relates to a method for the preparation of the hydrogel and to the use of the hydrogel.