QX.js API Reference


         QX.js is a JavaScript development platform that lets you extend and automate QuarkXPress by providing programmatic access to various application commands and the Document Object Model (DOM) of Layouts within QuarkXPress Projects. Being the most ubiquitous programming language in the world, as well being the lingua franca of the Web, JavaScript integration opens up amazing automation capabilities for anybody who is familiar with this language.
         QX.js provides JavaScript objects such as app and fs, and classes such as Layout, Project, and PrintLayoutOptions that correspond to the application's object model. You can interact with these objects by synchronously reading their properties and calling methods (synchronously or asynchronously) to perform operations on them.
         The platform is built on top of Chromium Embedded Framework (CEF) that allows QuarkXPress to apply the power of the Blink web browser engine and the V8 JavaScript engine - the same web browser engine and JavaScript engine used by Google Chrome - to the scripting interface of the application as well as its Document Object Model . V8 is Google’s open source high-performance JavaScript engine, written in C++. It implements ECMAScript as specified in ECMA-262, and runs on Windows 7 or later and macOS 10.10 or later.


         The QXML DOM (QuarkXPress Markup Language Document Object Model) is the JavaScript programming interface for accessing a QuarkXPress layout's object model. QXML DOM is based on the World Wide Web Consortium (W3C) Custom Elements specification, which is a part of the W3C DOM specification. Every QXML DOM element is a custom HTML5 element that represents a corresponding QuarkXPress layout object with a custom tag name along with its properties and styling. As it is based on the W3C HTML standard, you can expect to be immediately productive with scripting the QXML DOM if you are already familiar with scripting the HTML DOM. Like HTML DOM elements, all QXML custom elements are styled via custom CSS properties based on the W3C CSS Specification. The HTML 'style' attribute is used to specify the inline CSS properties to style QXML custom elements.

         Click here to access the QXML API reference

5-Minute Quickstart

Learn how to create your "HelloWorld" JavaScript sample.

Legal notices

©2019 Quark Software Inc. and its licensors. All rights reserved.

Quark, the Quark logo, and QuarkXPress are trademarks or registered trademarks of Quark Software Inc. and its affiliates in the U.S. and/or other countries. All other marks are the property of their respective owners.