changed on-click request for markdown preview into websocket connection