Copy link to clipboard
Copied
hi all
Tell me, you can call up a new HTML window (panel) from current HTML panel ? Photoshop CC2015.
I want to make a small toolbar, and the reaction of the instruments to implement a new HTML Windows. For example, in the HTML panel you will see a button to "Show the contents of the active folder", when you press the button you want to display all images in a folder in the new window (panel)
Lest suppose You have 2 HTML panels 'myPanel1' & 'myPanlel2'
They are defined in the CSXS/manifiest.xml like:
<Extension Id="myPanel1">
...
<Extension Id="myPanel2">
You have loaded CSInterface-6.1.0.js into Your panels via
<script src="./lib/CSInterface-6.1.0.js"></script>
( Version number may vary )
var csInterface = new CSInterface();
is amongst the first lines of Your panels javascript code.
You just need to call
csInterface.requestOpenExtension( 'myPanel2' );
from myPanel1.
Copy link to clipboard
Copied
Even me too having the same idea and willing to know is there any possibility
Copy link to clipboard
Copied
I would make a new extension panel and open it with
CSInterface.prototype.requestOpenExtension = function(extensionId, params)
Copy link to clipboard
Copied
thank you very much, and you could provide a code example ?
Copy link to clipboard
Copied
Lest suppose You have 2 HTML panels 'myPanel1' & 'myPanlel2'
They are defined in the CSXS/manifiest.xml like:
<Extension Id="myPanel1">
...
<Extension Id="myPanel2">
You have loaded CSInterface-6.1.0.js into Your panels via
<script src="./lib/CSInterface-6.1.0.js"></script>
( Version number may vary )
var csInterface = new CSInterface();
is amongst the first lines of Your panels javascript code.
You just need to call
csInterface.requestOpenExtension( 'myPanel2' );
from myPanel1.
Copy link to clipboard
Copied
interesting... Where can I get the latest version CSInterface-6.1.0.js ?
Copy link to clipboard
Copied
tell me how close the second window ?
may be button, scripts ?
com.example.test2html'.zip - Google Drive - example of 2 html panels
Copy link to clipboard
Copied
Hi Andrey,
You can ask to close the extension itself only with
CSInterface.prototype.closeExtension = function()
But You can also send events between extensions with the help of
CSInterface.prototype.dispatchEvent = function(event)
All You need is to watch for a custom CSEvent ( lets call it "CLOSEYOURSELFMYHUBLESERVANT" ) in the secondary panel with
CSInterface.prototype.addEventListener = function(type, listener, obj)
Check out the docs:
Adobe CEP · GitHub
Oliver
Copy link to clipboard
Copied
thank you, I will understand with examples. Tell me, can the second window to create dynamic content ?
Copy link to clipboard
Copied
Sure, You can do whatever You want in them, becasuse the panels are chromium browsers.
Copy link to clipboard
Copied
Hi Andrey,
Could you please share the sample extension once again.
Sankar L