Using EditRail with Typography Stylist

Typography Stylist adds the Typography Stylist block to the block editor. You can put that block on the EditRail toolbar with no code.

Pin the Typography Stylist block

Install and activate both plugins. Then use one of these methods:

  • Open Toolbar settings. In Add a block or pattern, type “Typography” and click Typography Stylist.
  • Drag the Typography Stylist block from the block inserter and drop it on the toolbar.
  • Select a Typography Stylist block in the canvas. Open its options menu and choose Pin to toolbar.

The pinned tool shows the block’s own icon. Arm it and click the canvas to insert a Typography Stylist block at that point. Saved sets keep the pin.

A pin is a per-user preference. Each author pins the block for their own toolbar.

Add a tool from code

Code can add a tool that every author sees, nest it in the Paragraph flyout, or insert a preset block. Use the provider API in Extending EditRail. This descriptor nests a Typography Stylist tool under the pinned Paragraph tool:

window.toolrail.registerTool( {
	id: 'my-plugin/typography-stylist',
	label: 'Typography Stylist',
	parent: 'text',
	insertBlock: 'typost/block'
} );

typost/block is the block name of the Typography Stylist block.

If one plugin is not active

  • Typography Stylist without EditRail: nothing changes.
  • EditRail without Typography Stylist: a pinned Typography Stylist tool does not show on the toolbar. In Toolbar settings, it shows “(inactive)”. It comes back when Typography Stylist is active again.

For the Typography Stylist documentation, see Typography Stylist.