title: Reading the activeDocument in Photoshop and send it to web page or clipboard API
body: <p>I'm new to Photoshop scripting and javascript. How can I read via code the image inside the active window in Photoshop CS5-C6 and paste that image into a web page DIV?</p>
  
  <p>FYI I'm a complete newbie to programming. My goal is to build a simple Mac App prototype with a wrapper running a web app inside. That web app needs to connect to Photoshop via TCP and read the image inside the selected window document and then paste it somehow into the web app's html. (Photoshop has feature inside the edit menu called 'remote connections' that converts Photoshop into a server and allows any external applications to read/write stuff inside Photoshop by sending javascript over TCP)</p>
  
  <p>So, how can I:</p>
  
  <p>1) Access Photoshop over TCP via javascript?
  2) How can I get the image inside the active Photoshop window and paste into the web app? </p>