Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Can I use JavaScript code in main.js to change the height of the plugin panel?

Contributor ,
Mar 21, 2024 Mar 21, 2024

Hello everyone!

I am here to ask a question! The height of the Illustrator CEP plugin is defined in the manifest.xml. Can I use JavaScript code in main.js to change the height of the plugin panel as the functionality changes during use?

Thank you all.

TOPICS
Scripting , SDK
396
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Mar 21, 2024 Mar 21, 2024

Sure, just use the resizeContent() method of CSInterface:

csInterface.resizeContent(300, 600);

 

Translate
Adobe
Participant ,
Mar 21, 2024 Mar 21, 2024

Sure, just use the resizeContent() method of CSInterface:

csInterface.resizeContent(300, 600);

 

____________________
Robotic Process Automation in Desktop Publishing (Book): https://doi.org/10.1007/978-3-658-39375-5
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 21, 2024 Mar 21, 2024

@GNDGNThank you! I have tried this method, but I received an error message "TypeError: csInterface.resizeContent is not a function."

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 21, 2024 Mar 21, 2024

Have you instantiated CSInterface before the method call?

let csInterface = new CSInterface();

 

____________________
Robotic Process Automation in Desktop Publishing (Book): https://doi.org/10.1007/978-3-658-39375-5
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 21, 2024 Mar 21, 2024
LATEST

I made a silly mistake. I was using an older version of CSInterface.js. After switching to the updated version of CSInterface.js, the issue was resolved. I apologize for taking up valuable community resources. Thank you for the help, @GNDGN 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines