rmdf: make editor optional, fix controller.toHTML