gpt-3.5-turbo-0613· OpenAI WildChat-4.8M (AI2)
scriptrunner confluence disable thumbnail
- User
scriptrunner confluence disable thumbnail
- Assistant
To disable thumbnails in Confluence using the Scriptrunner app, you can add a custom content formatting script. Follow these steps:
- Go to Confluence Administration.
- In the sidebar, click on "Add-ons" (or "Apps") and then select "Script Console" under the Scriptrunner section.
- Click on "Add a script" and choose "Custom Content Formatting."
- Now, enter the following script (groovy) code:
import com.atlassian.confluence.pages.AttachmentManager import com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport import org.springframework.beans.factory.annotation.Autowired // disable thumbnails @ComponentImport private AttachmentManager attachmentManager Attachments.RepresentationsMode disableThumbnails() { Attachments.RepresentationsMode originalMode = attachmentManager.getAttachmentsRepresentationsMode() attachmentManager.setAttachmentsRepresentationsMode(Attachments.RepresentationsMode.NONE) return originalMode } // enable thumbnails @ComponentImport private AttachmentManager attachmentManager void enableThumbnails(Attachments.RepresentationsMode originalMode) { attachmentManager.setAttachmentsRepresentationsMode(originalMode) } disableThumbnails() // enableThumbnails(<originalMode>) if you want to enable thumbnails again- Click on "Run" to execute the script.
This script will disable thumbnails in Confluence. If you want to enable thumbnails again later, you can uncomment the last line and replace
<originalMode>with the original mode returned by thedisableThumbnails()function.