Docs claim that bulleted and numbers lists are added by default to the menu; they aren't.
維護者通常 4 天內回覆
評估
- 難度
- 1/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 78/100
- Issue 類型
- 文件
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
研究方向
從 modules/ROOT/partials/menu-item-ids/advlist-menu-items.adoc 開始,接著將其中的表格與 Lists 外掛程式的選單項目頁面,以及 issue 中連結的預設選單項目範例進行比較。更新文件,準確說明 bullist 和 numlist 是選單項目還是工具列按鈕;受影響的文件不再聲稱它們預設會出現在 Format 選單中時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
Thanks for making TinyMCE available for open-source users! I include it in my software (https://github.com/bjones1/CodeChat_Editor) and appreciate how well-written it is. Here's a quick-ish bug report on docs that would help improve the docs a bit.
Note: Claude wrote most of this. I've edited a few things to sharpen the text and make it a bit more interesting. I ran the sample code and verified that the numbered list / bulleted list options don't appear on the Format menu.
Documentation/Product Version
TinyMCE 8 documentation ("latest") / TinyMCE 8.10.2, the current release.
Links to Page(s) affected
- https://www.tiny.cloud/docs/tinymce/latest/advlist/#menu-items
- https://www.tiny.cloud/docs/tinymce/latest/available-menu-items/ (includes the same table)
- Source: https://github.com/tinymce/tinymce-docs/blob/tinymce/8/modules/ROOT/partials/menu-item-ids/advlist-menu-items.adoc
Description of Issue
The docs linked above claim that bulleted and numbered lists are added by default to the menu; they aren't.
Claude says, with its typical verbosity:
The List Styles plugin's "Menu items" table lists bullist and numlist, with a default menu location of Format. The note below the table says these menu items "are provided by the core lists plugin". However, TinyMCE has no menu items with these names:
- The Format menu doesn't show them by default. Naming them in the
menuoption doesn't add them either; TinyMCE silently skips them. editor.ui.registry.getAll().menuItemscontains neither name, whileeditor.ui.registry.getAll().buttonscontains both.- In the source, the List Styles plugin (
advlist/main/ts/ui/Buttons.ts) registersbullistandnumlistonly withaddSplitButtonoraddToggleButton. The Lists plugin'slists/main/ts/ui/MenuItems.tsregisters onlylistprops. None of the releases I checked (5.10.9, 6.8.6, 7.9.3, and 8.10.2) registers either name as a menu item, and neither doesmain.
The docs also contradict themselves. The Lists plugin's menu items table lists only listprops, and the default menu items show a Format menu without bullist or numlist. The menu items table appears to be a copy of the plugin's toolbar buttons table, which is correct.
To reproduce, paste this page into the HTML panel of JSFiddle or CodePen, or save it as a .html file and open it in a browser:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/tinymce.min.js"></script>
</head>
<body>
<textarea id="editor"><p>Click here, then open the Format menu.</p></textarea>
<pre id="report"></pre>
<script>
tinymce.init({
selector: '#editor',
license_key: 'gpl',
plugins: 'lists advlist',
// The toolbar buttons work, so both plugins loaded.
toolbar: 'bullist numlist',
// Name the documented menu items explicitly. The Format menu shows
// only Bold and Italic.
menu: {
format: { title: 'Format', items: 'bold italic | bullist numlist' }
},
setup: (editor) => editor.on('init', () => {
const { buttons, menuItems } = editor.ui.registry.getAll();
document.getElementById('report').textContent = [
`TinyMCE ${tinymce.majorVersion}.${tinymce.minorVersion}`,
`Toolbar buttons: bullist=${'bullist' in buttons}, numlist=${'numlist' in buttons}`,
`Menu items: bullist=${'bullist' in menuItems}, numlist=${'numlist' in menuItems}`,
].join('\n');
}),
});
</script>
</body>
</html>
- Click in the editor, then open the Format menu.
- Read the report printed below the editor.
Expected result, per the docs: the Format menu shows Bold, Italic, Bullet list, and Numbered list, and the report shows Menu items: bullist=true, numlist=true.
Actual result: the Format menu shows only Bold and Italic, and the report shows:
TinyMCE 8.10.2
Toolbar buttons: bullist=true, numlist=true
Menu items: bullist=false, numlist=false
Suggested Fix
Update the docs is the easiest fix. My personal preference is for the code to change -- I think having these in the menu by default makes sense.
- 主要語言
- JavaScript
- 星號
- 97
- 分支
- 218
- 平均合併
- 4 天 16 小時
- 30 天內合併 PR
- 52
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
tinymce/tinymce-docs 的其他 Issue
-
I can't find what I'm looking for: ui-components/dialog.md可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 35/100
tinymce/tinymce-docs#2778 · 2 則留言 ·
維護者通常 4 天內回覆
-
enhancement
難度 4/5 3-5 天 新手友好度 35/100
tinymce/tinymce-docs#2155 · 2 則留言 · 1 個 reaction ·
維護者通常 4 天內回覆
-
bug
難度 4/5 3-5 天 新手友好度 25/100
tinymce/tinymce-docs#1900 · 4 則留言 ·
維護者通常 4 天內回覆
查看 tinymce/tinymce-docs 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
Life-Framework/Life-Framework#7017 ·
維護者通常 1 天內回覆
-
e/DevOps enhancement
難度 2/5 1-3 小時 新手友好度 86/100
Accenture/sfmc-devtools#2795 ·
維護者通常 1 天內回覆
-
agent/guide documentation help wanted stage/010-actionable
難度 2/5 1-3 小時 新手友好度 82/100
kubestellar/console-kb#4003 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 2/5 1-3 小時 新手友好度 78/100
FilOzone/synapse-sdk#1201 · 1 則留言 ·
維護者通常 1 天內回覆