2017 wikitext editor/zh

2017 維基文本編輯器是視覺化編輯器的一個模式，允許用戶在編輯維基文本時使用視覺化編輯器的工具和工具欄. 使用視覺化編輯模式時仍可通過單擊工具欄中的按鈕切換到維基文本模式.

你可以在維基媒體基金會的桌面版專案透過你的偏好設定頁啟用這個功能.

它是什么
为了支持2016-2017年度计划中的计划之一，维护并逐步改进当前的内容创建和策展界面''，编辑部正在研究一个新的维基文本编辑器.

它被集成到可视化编辑器中，以便更好地在两者之间切换. 它具有类似的设计和可视编辑器中存在的许多工具，包括citoid服务. 新的wiki文本编辑模式可用作桌面用户的测试功能. Phabricator的主要任务是T104479（该软件有时也被称为“现代wiki文本编辑器”或“新维基文本编辑器”/“NWE”）.

这是一个“新”编辑器，而不是对现有wiki文本编辑器的修改. 测试功能模式允许用户提供反馈，并有时间避免突然中断编辑器和破坏现有小工具.

这一更改的原因是什么
2010年，维基媒体基金会完成了可用性项目（它为我们提供了当前的Vector皮肤，上传工具和内容编辑器），并切换到了社区在2010-2015战略中选择的问题. This has included a number of improvements for editing tools, most notably the visual editor, alongside notifications and other improvements. However, the strategy is not and has never been to replace wikitext; we see both systems for editing as important in the long-term to help the community continue to make Wikimedia projects as successful as they are now.

截至2016年12月，在几乎所有维基媒体wiki上，我们提供三个主要的内容编辑器. 它们在外观、操作、性能以及帮助和支持方面与用户不一致. 其中一个是2010年代的桌面维基文本编辑器，名为WikiEditor，另一个是桌面和移动表单中的可视化编辑器，最后一个是简单的移动wiki文本编辑器.

自2010年以来，我们已经了解了很多关于新用户和有经验用户如何使用我们的软件以及他们希望在我们的编辑软件中看到更改的内容. 我们的研究已经为围绕编辑的设计提供了可视化编辑器的构建，为新用户提供了如何使用它的明确标志，同时避开那些喜欢他们已经知道的WikiEditor的有经验的用户. 虽然不完美，但我们已经看到新用户对可视化编辑器的设计，工作流程提示和整体体验的强烈偏好. 我们在工程方面也学到了很多东西，并且已经建立了它可以在页面上使用的方式（如单击""）或工具内部（如Flow中）和桌面上或移动，并且以可由其他功能扩展的方式.

有三个不一致的编辑系统是不好的. 这对于较新的编辑器是不利的，因为他们从一个编辑器学到的东西不能应用于其他上下文（例如编辑谈话页面）. 这对经验丰富的编辑来说是不好的，他们必须解决几个问题才能弄清楚新手的情况，以及如何提供帮助. 对于需要在每个编辑器中单独设置社区需求的管理员来说，这是不好的，或者发现他们无法在某些编辑器中获取它. 这对于脚本和小工具开发人员来说是不好的，他们必须处理许多不同的情况（或忽略它们）. 这对于开发人员来说是不好的，他们需要在需要修复或添加功能时将复杂性的三倍复杂化. 这对维基媒体基金会的捐赠者来说是不利的，维基媒体基金会的捐款用于支持这些多个并行工作流.

因此，我们正在开发一个新的wiki文本编辑器. 这将在桌面和移动设备，wiki文本和可视化编辑器之间提供单一、集成、一致的体验. 它将是一个可以集成到其他编辑器中的平台，以便在情境和内容类型之间尽可能地体验. 我们将尽可能为用户提供良好的体验，同时限制现有功能的破坏.

请注意，当前的部署阶段是将其作为测试版功能提供并获得反馈. 只有在我们满足了我们的质量要求（包括新用户测试和有经验的用户快乐）之后，可能在2017年中期，我们将默认开始提供它来代替当前的wiki文本编辑器. 不喜欢它的用户当然可以在测试功能的同时不使用它，并且一旦它被发布给所有人，就可以将它与可视化编辑器一起禁用. 目前的wiki文本编辑器不会去任何地方，至少在接下来的几年里. 虽然我们可能最终落日，但任何喜欢它的人都可以保留它.

第一版 (測試版)
该项目的初始目标是与现有的wiki文本编辑器WikiEditor保持一致，使用相同的工具栏，在相同的位置使用相同的按钮，因此用户可以获得一致的体验. 这意味着至少提供wiki文本编辑器中的所有控件，非常少见的按钮除外：


 * 基本工具 (粗體、斜體、簽名、連結和圖片)；
 * 進階工具 (標題、符號清單、編號清單、大字、小字、上標和下標、圖片庫和表格)；
 * 插入特殊符号，以及
 * 查找与替换

所有这些都是在2016年8月完成的，还有许多工具，不在现有的wikitext编辑器中（如删除线、下划线、模板插入等），粘贴的HTML等功能会自动转换为wikitext. 特别是，我们还提供“citoid”自动引用工具，允许用户根据URL或DOI快速添加引用. 这与英语维基百科的一些维基已经为自己编写的小工具类似，但更先进，现在它们将适用于所有维基.

We undertook extensive QA testing that the features work as expected, and a design review and structured user testing. Once we were happy that it is adequately working as intended, and is (at least) no worse for new users, we have sought feedback from experienced users of all levels via a Beta Feature.

最終測試版 (正式版發布前)
The point of the first release as a beta feature is to get some initial feedback on how well this new editor works for people. We expect the feedback to include a lot of suggestions for changes. There are a number of improvements that we're already considering. Some of these probably need to be addressed before the new wikitext editor would be released outside of a beta feature. Some of these are technically difficult and so have been postponed, whilst others would benefit from real-world feedback from existing users to shape the features as usefully as possible.

For the first category (big challenges), we believe that we will need to address section editing, in which clicking edit will show small parts of the page to edit, and a fully responsive design, so that the interface can scale up and down more cleanly for smaller devices, where users are zoomed-in, or other accessibility and platform reasons; these will let us provide the feature in mobile as a beta example as well, to ensure it works for all our editors, not just those on desktop.

For the second category (feedback needed), we will need to provide in-editor help to guide users through the editing process from the very first time they click edit and also later in their editing careers. Right now the wikitext editor has a "help" tab with some brief wikitext guidance; in the visual editor, we have a link to the user-guide, which we could replicate for this purpose. How this should work, and what it should highlight, is likely to be something on which many members of our communities have expert ideas. We will also need to clean up how gadgets extend the editor, as the new editor integration right now is complex and confusing. This would make converting some gadgets harder than it should be. Many wiki communities depend on particular gadgets to speed up their editing workflow, and it's important that we preserve the ability for wikis to flexibly experiment with improvements like this.

Naturally, any change of this scale is likely to be disruptive for some users' workflows, and will have a few issues with relative 'edge cases' not being addressed. We look forward to uncovering and addressing these over the weeks and months following the release of the beta feature.

Nice-to-haves
Alongside the above, there are other, new features we'd love to provide if possible, but which may prove too costly to develop or too slow for users, and so are not planned from the outset. One feature we'd be interested in providing is saving automatic local drafts as users edit, so that if their browser or computer crashes or loses power mid-edit they can resume rather than having to restart. This would rescue users from quite frustrating, if uncommon, occurrences, particularly people with poorly/old computers or network connections.

A big feature that often gets discussed is syntax highlighting of wikitext to help guide people's eyes to the right content for which they're looking. This feature was in fact built for the existing wikitext editor back in 2011, but we had to abandon it because the very high complexity of wikitext means that this was exceedingly slow for most users. Five years later, most users' machines are a fair bit faster than they were back then, which helps a little. Also, it might be worth exploring how performant we could make a feature doing this if we were to make some simplifications of the kinds of wikitext which we try to highlight.

(In the meantime, syntax highlighting is provided by Remember the dot's syntax highlighter and WikEd, which are available on some wikis as gadgets). Syntax highlighting has also been introduced to the 2017 wikitext editor using Extension:CodeMirror.

More complex and error-prone than syntax highlighting, but possibly even more useful, would be a feature for folding wikitext structures into blocks so that users can easily ignore things they don't want to edit without having to read through them. For example, long infobox invocations or references could be folded up into blocks until you want to edit them. The technologies we built for the visual editor are particularly well-suited for providing this use case in a reliable fashion, so this may be something we could look at doing. Again, as with syntax highlighting we might need to compromise on the complexity of wikitext that we recognise in return for providing something performant enough to be useful to most of our users.

Another nice feature we could provide would be to prompt users when they save with two or three buttons to add one-click edit summaries based on their recent activities. This kind of feature is quite popular on some wikis as a gadget and it would be nice to provide it to all users on all wikis, without those wikis needing to have a gadget guru on hand to help set it up and maintain it.

资源

 * An early rough design mockup from April is available here. To see the wikitext editor, click the brackets icon in the top-right corner.
 * An old rough demo video is also available as of mid-May 2016 at https://www.youtube.com/watch?v=jgd2ZHOZGBE.
 * Video demo of the 2017 wikitext editor from the December 2016 CREDIT showcase
 * The current version can be seen via Beta Features at Special:Preferences; enable the "new wikitext editor" item, go to https://www.mediawiki.org/wiki/Project:Sandbox?veaction=editsource (for example) and see what it looks like when you switch back and forth.
 * Enabling the "2017 wikitext editor" for extension "VisualEditor"

參見

 * Status update about editing software, June 2016
 * 反饋頁面
 * - the Beta Feature for wikitext syntax highlighting