Copy link to clipboard
Copied
Hi,
I am using the following JavaScript to modify the title for current extension dialog (Modeless dialog):
var csInterface;
$(function () {
csInterface = new CSInterface();
csInterface.addEventListener(Events.Products.ImageBind, init);
});
function init(event) {
csInterface.setWindowTitle("Images");
}
I also tried using "new CSInterface().setWindowTitle("Article");" in init() function instead of "csInterface.setWindowTitle("Images");". But title is not modified.
Please guide me on how to modify dialog title.
The manifest.xml file has the following definition for extension:
<Extension Id="com.adobe.illustrator.ImageUI.dialog">
<DispatchInfo>
<Resources>
<MainPath>./html/image.html</MainPath>
<ScriptPath>./js/main.jsx</ScriptPath>
<CEFCommandLine/>
</Resources>
<Lifecycle>
<AutoVisible>true</AutoVisible>
<Visible>true</Visible>
</Lifecycle>
<UI>
<Type>Modeless</Type>
<Menu>title</Menu>
<Geometry>
<Size>
<Height>400</Height>
<Width>450</Width>
</Size>
</Geometry>
<Icons/>
</UI>
</DispatchInfo>
</Extension>
Thank you
Yes, ver.19.1.1 supports CSInterface version6.0 and not supposed that feature.
Copy link to clipboard
Copied
padmanabanp_IndCbe​, hi!
Are you try this simple code in main.js file?
(function() {
'use strict';
var csInterface = new CSInterface();
init();
function init() {
themeManager.init();
csInterface.setWindowTitle("Images");
}
}());
And what of your Illustrator version?
Copy link to clipboard
Copied
Hi o-marat,
Thanks for your reply. I use it in a file named image.js and i use Illustrator CC 2015.1.1 (v 19.1.1) and CSInterface - v6.1.0.
Also i have a doubt in the above code, what is the purpose of using "themeManager.init();" and how to initialize themeManager? Please reply. Thank you once again
Copy link to clipboard
Copied
The themeManager method is included by CC Extensionbuilder for Brackets. You can reference below link:
However, You can comment out it and test previouse code.
Copy link to clipboard
Copied
Hi o-marat,
Thanks for your reply. I gave a alert in CSInterface.js file as shown below:
CSInterface.prototype.setWindowTitle = function(title)
{
alert(title);
window.__adobe_cep__.invokeSync("setWindowTitle", title);
};
I call the setWindowTitle() to change the title "Image" to "Article".
csInterface.setWindowTitle("Article");
The alert() displays the title but the title is not set for dialog. Can you please guide me on what could be the problem and how to rectify it.
Thank you
Copy link to clipboard
Copied
I try to below and work fine:
new CSInterface().setWindowTitle("Call setWindowTitle Method test");
Copy link to clipboard
Copied
Hi Ten A,
Thank you for replying. I am using Illustrator CC 2015.1.1(19.1.1) 64 bit and recently replaced CSInterface.js file from version 5.2 to v6.1.0. I updated in manifest.xml file to use version 6:
<?xml version="1.0"?>
<ExtensionManifest
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ExtensionBundleId="com.adobe.illustrator.xxxUI" ExtensionBundleVersion="1.0" Version="6.0">
<ExtensionList>
<Extension Id="com.adobe.illustrator.ImageUI.dialog" Version="1.0.0"/>
</ExtensionList>
<ExecutionEnvironment>
<HostList>
<Host Name="ILST" Version="19.0"/>
</HostList>
<LocaleList>
<Locale Code="All"/>
</LocaleList>
<RequiredRuntimeList>
<RequiredRuntime Name="CSXS" Version="6.0"/>
</RequiredRuntimeList>
</ExecutionEnvironment>
<DispatchInfoList>
Is there any other thing i need to modify? kindly let me know. thank you.
Copy link to clipboard
Copied
AFAIK, That metihod supports up to ver.19.2.
Copy link to clipboard
Copied
Hi Ten A,
I tried below sample but was not working:
Please guide me on how to upgrade from CSInterfsce v 5.2 to v6. Thanks a lot. I just replaced my CSInterface file for new version in my js folder of extension. Is there anything else i should update? Please reply. Thank you
Copy link to clipboard
Copied
Unfortunately, You can't use CSInterface.js ver.6.2 with Illustrator ver.19.1. You should to update your Illustrator ver.19.1 to ver.19.2.
Copy link to clipboard
Copied
Hi.... Im using CSInterface - v6.1.0 (not 6.2). Also i added an alert in CSInterface setWindowTitle function as below:
CSInterface.prototype.setWindowTitle = function(title)
{
alert(title);
window.__adobe_cep__.invokeSync("setWindowTitle", title);
};
The title is displayed in alert() but not dialog title is not updated. Is it because im using Illustrator v 19.1.1?
Copy link to clipboard
Copied
Yes, ver.19.1.1 supports CSInterface version6.0 and not supposed that feature.
Copy link to clipboard
Copied
Thanks a lot Ten A,
I tested in updated Illustrator version (2015.3.1) and it is working fine now. Thank you.