I have (hopefully) working implementations of AE and VAE based on a CNN and an RNN 19 for text. I did this long time ago, so I cannot really follow every single line right now. But maybe it gives you ideas.
Note that making an AE an VAE makes learning much more difficult. This seems to be a general observation and I would agree. Both AE works just fine, but both VAE – although in terms of code the changes a very minor – need much longer training to show results.
I hope that helps.