fix(creator-studio): 加载正文编辑格式工具栏
选中文字时的 RichText 加粗、斜体、链接等工具由 WordPress format-library 注册。 BlockTools 虽然提供 inline toolbar slot,但此前前台没有加载 wp-format-library, 因此正文选区没有格式工具。为 Creator Studio 前台显式加载该 script/style handle, 并将行内格式工具栏统一为深色圆角悬浮样式。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
9e8913ea0a
commit
4868de2cda
5 files changed
+47
-5
No files matched your search
@@ -132,6 +132,14 @@ test('studio app keeps autosave, recovery, and the publish drawer wired', () =>
|
||||
assert.match(drawer, /立即发布/);
|
||||
});
|
||||
|
||||
test('frontend enqueues the WordPress format library for inline RichText tools', () => {
|
||||
const enqueue = read('src/Core/CreatorStudio.php');
|
||||
assert.match(enqueue, /\$deps\[\]\s*=\s*'wp-format-library'/);
|
||||
assert.match(enqueue, /wp-format-library/);
|
||||
assert.match(read('assets/creator-studio/src/index.tsx'), /<BlockTools>/);
|
||||
assert.match(read('assets/creator-studio/src/styles/studio.scss'), /block-editor-rich-text__inline-format-toolbar/);
|
||||
});
|
||||
|
||||
test('固定顶栏包含保存状态、撤销/重做、预览和发布动作', () => {
|
||||
assert.match(appSource, /className="jio-creator__bar"/);
|
||||
assert.match(appSource, /history\.undo\(\)/);
|
||||
|
||||
Reference in new issue
Block a user