WP Manifestindependent plugin directory
manifest / editor / ys-editor-scope-wrapper

YS Editor Scope Wrapper

Apply CSS scope classes to WordPress Block Editor wrapper, so wrapper-scoped CSS that only exists on the frontend also works in the editor preview. Auto-detects candidates from posts.

★ 0stars
1release downloads
v1.1.2latest · 5mo ago

Install

Download ys-editor-scope-wrapper.zip From the v1.1.2 release on GitHub, May 26, 2026

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/ya19880104/ys-editor-scope-wrapper/releases/download/v1.1.2/ys-editor-scope-wrapper.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

中文版本: README.zh-TW.md

Apply CSS scope classes to the WordPress Block Editor wrapper and iframe canvas, so wrapper-scoped CSS that only exists on the frontend also works inside the editor preview.

The problem

Many page-builder workflows write CSS as .scope-class .xxx { ... }:

  • On the frontend — the page builder (GreenShift / GL Page Builder / etc.) injects <div class="scope-class"> around the_content, so .scope-class .xxx rules match.
  • In the Block Editor — that wrapper does not exist. .editor-styles-wrapper has no scope-class on it, so every wrapper-scoped rule becomes dead. The editor shows raw text, no fonts, no colors, no layout.

This plugin closes that gap.

What it does

On every Block Editor load:

  1. Reads the configured class list from ys_editor_scope_classes option.
  2. Adds each class to .editor-styles-wrapper (and iframe[name="editor-canvas"] body, for the new iframe canvas mode).
  3. Uses MutationObserver so iframe lazy-loading and editor remounting are handled.

The added classes are pure DOM additions — they are not written into post_content.

Auto-detection

The Settings screen automatically scans your published posts and surfaces candidate classes you can tick on/off:

Source What it picks up
Style Manager root class The first dynamicGClasses[].value inside each `` block.
Inline `

Releases

1 release. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v1.1.2 latest
May 26, 2026 5mo ago
ys-editor-scope-wrapper.zip
1