Add support for replacing inner content

Resolves #21