Get input to terminal from Javascript



I am wanting to use cloud9 in a project I am creating where there will be various components on the one web page (in iFrames) and I would like to be able to control some of the other components using the terminal in cloud9.

Is there a way to read what the user has entered into the terminal in something like Javascript so this information could be passed to the other components? As a result I would also need to prevent the default action of the terminal.

If this is not possible, is there a way to completely remove the terminal from cloud9 and use a separate browser terminal instead?