Secondary toolbar with quick edit tools

In the default configuration, the main viewer toolbar includes 5 buttons that provide access to quick edit tools: "Text tools", "Draw tools", "Attachments and stamps", "Form tools", "Page tools". Clicking any of those buttons opens the secondary toolbar containing the corresponding tools. In this sample the quick edit access buttons have been moved to the front of the main toolbar, otherwise they function as in the default layout.

window.onload = function(){ const viewer = new GcPdfViewer("#viewer", { workerSrc: "/documents-api-pdfviewer/demos/product-bundles/build/gcpdfviewer.worker.js", supportApi: { apiUrl: window.top.SUPPORTAPI_URL, token: window.top.SUPPORTAPI_TOKEN, webSocketUrl: false } }); viewer.addDefaultPanels(); viewer.addAnnotationEditorPanel(); viewer.addFormEditorPanel(); const toolbarLayout = viewer.toolbarLayout; toolbarLayout.viewer.mobile = toolbarLayout.viewer.default = ["text-tools", "draw-tools", "attachment-tools", "form-tools", "page-tools", "$split", "save", "$navigation", "$zoom"]; viewer.open("/documents-api-pdfviewer/demos/product-bundles/assets/pdf/realestate-lease.pdf"); }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Quick edit tools</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="./src/styles.css"> <script src="/documents-api-pdfviewer/demos/product-bundles/build/gcpdfviewer.js"></script> <script src="./src/app.js"></script> </head> <body> <div id="viewer"></div> </body> </html>
#viewer { height: 100%; }