feat(creator-studio): portal dropdowns, hidden content, two-step block delete

Toolbar
- New ToolMenu renders menus through a portal on body, so they are no longer
  clipped by the horizontally scrolling toolbar and no longer fall back to a
  native <select>. Triggers reuse .jio-creator__tool-btn geometry, fixing the
  heading button's mismatched height/size/position.
- Heading / list / align / quote / hidden-content are all dropdowns.
- Lists: unordered + ordered via InsertOrderedList/InsertUnorderedList.
  The TOC button is removed (it also used the wrong icon).
- Adds left / center / right alignment.
- Adds hidden content: comment / login / VIP / paid, wired to the existing
  [reply], [jio_hide mode="login"], [vip] and [payshow] shortcodes.

Editor content
- Quote blocks now match the live article: full .quote_q structure, four
  colour variables, and an SVG-mask quote mark that does not depend on the
  Font Awesome font being present inside the iframe.
- Block math is centred on a transparent background instead of a full-width
  grey bar.
- Code blocks are plain <pre><code>, identical to the article page; language
  and theme selection is gone and EnlighterJS handles highlighting globally.
  The classic submit editor's code modal follows the same shape.
- Hidden content reuses the .tinymce-hide structure and shows a readable label
  while keeping the shortcode text in the DOM for saving.

Block deletion
- Two-step delete, WPS style: the first click only selects and highlights the
  block, the second click removes it. Clicking elsewhere or Esc cancels.

Contracts updated and extended; 884 widget-system tests pass.
This commit is contained in:
kate522 committed 2026-11-09 15:03:50 +08:00
1 parent 3e48fdf61e
commit c5bdbc0457
16 files changed
+1090 -545

No files matched your search

+30 -13
View File
@@ -1,4 +1,6 @@
/* Content shown inside the front-submit TinyMCE iframe. */
/* 隐藏内容:短代码留在 .hide-before / .hide-after,编辑器只显示可读标签。 */
.tinymce-hide {
position: relative;
margin: 18px 0;
@@ -13,7 +15,7 @@
margin: 0;
color: #f04494;
font-family: Consolas, Monaco, monospace;
font-size: 12px;
font-size: 0;
line-height: 1.5;
}
@@ -23,8 +25,16 @@
left: 14px;
}
.tinymce-hide > .hide-before::before {
content: attr(data-jio-hide-label);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.02em;
}
.tinymce-hide > .hide-after {
margin-top: 8px;
display: none;
}
.tinymce-hide > [contenteditable="true"] {
@@ -105,23 +115,30 @@
--quote-color: #23790e;
}
.enlighter-pre {
position: relative;
max-height: 300px;
overflow: auto;
padding: 32px 12px 12px;
border-radius: 6px;
/* 代码块:与前台文章页一致,只用 pre > code,由 EnlighterJS 在发布页高亮。 */
pre {
margin: 0 0 1.1em;
padding: 14px 18px;
overflow-x: auto;
border-radius: 8px;
background: #f2f4f5;
color: #2b2b2b;
font-family: Consolas, Monaco, "Courier New", monospace;
font-size: 13px;
line-height: 1.6;
white-space: pre-wrap;
word-wrap: break-word;
}
.enlighter-pre code.gl {
display: block;
pre code {
border: 0;
background: transparent;
color: inherit;
font-family: Consolas, Monaco, monospace;
line-height: 1.45;
white-space: break-spaces;
font-family: inherit;
font-size: inherit;
line-height: inherit;
padding: 0;
white-space: inherit;
}
.file-download-box {