Open main menu

Changes

910 bytes added ,  23:35, 19 April 2023
Updated for 2023
The [http{{Feature|image=Visual Editor (linking).png|imgdesc=Direct editing|title=}}{{#set://wwwfeature description = A reliable rich-text editor for MediaWiki.mediawiki Allows you to just "edit the page you see" while being aware of all the syntactically rich features of templates, extensions etc.org/wiki/VisualEditor }}{{#set:feature notes = The Visual Editor] for MediaWiki relies is available Here and on the '''Wikipedia.}}{{#set:feature tests = [[mw:ExtensionSpecial:ParsoidUserLogin|ParsoidLogin]]''' extension <ref>to the wiki, and make an edit in your [[httpsSpecial:MyPage//git.wikimedia.org/tree/mediawiki%2Fextensions%2FParsoid Parsoid extensionSandbox|personal sandbox]]</ref> AND the Parsoid service. The Parsoid service is a node.js server that interacts with the mediawiki API.}}{{#set:feature examples = }}
<blockquote>"Parsoid implements a bidirectional wikitext parser and interpreter. It converts and interprets wikitext into an annotated HTML DOM, which can then be edited with HTML editor tools such as the Visual Editor. It also provides the conversion of a (possibly modified) HTML DOM back to wikitext."</blockquote>
[http[File:VisualEditor-logo.svg|alt=Visual Editor|frameless|641x641px|Visual Editor logo]]== Links ==* [https://www.mediawiki.org/wiki/Help:VisualEditor/User_guide User Guide]* [https://xmlwww.coverpagesmediawiki.org/ Robin Coverwiki/Project:Sandbox Demo] would be proud(no account needed)* [https://www.mediawiki. It round-trips org/wiki /VisualEditor/Portal/Help Portal to HTML + RDFa and back.Help Content about VE]
== Installation Back story ==You'll need at least [httpWiki markup is a sort of shorthand for more complicated HTML markup designed to create nicely formatted web documents. Although in the beginning wiki markup simplified the process of creating nicely formatted content, that shorthand can get increasingly complex in order to produce complicated layout and content. The extension of the markup system over time to include a template subsystem and macros inevitably leads to a tension between ease of use, and power. This tension was one of the primary factors that the Wikimedia Foundation cited as an impediment to new content collaborators for the Wikipedia. <ref>https://wwwstrategy.mediawikiwikimedia.org/wiki/Release_notesMarch_2011_Update</ref><ref>http://1strategy.23 MediaWiki v1wikimedia.23]. I personally run org/wiki/Editor_Trends_Study</ref> <ref>See this October 2013 article in the same [MIT Technology Review http://www.mediawikitechnologyreview.orgcom/featuredstory/520446/wikithe-decline-of-wikipedia</Special:Version version that they're running on mediawikiref>.org] (1 A visual editor was deemed nearly impossible after many early attempts failed, but with the advent of Node.24wmf3 [[User:Freephile|gregjs technology, it became an idea that was plausible again.rundlett]] ([[User talk:Freephile|talk]]) 19:39, 9 May 2014 (UTC))=== WebFaction ===
To install the Visual Editor extension in a Webfaction account, you need Fast-forward to first have node installed and 2016 when VisualEditor was fully working. You can do this by using the [http://docs.webfaction.com/software/custom.html installer in your webfaction panel] and associating as a path with the app Visual WYSIWYG interface for editing MediaWiki content, using a domainNode. I chose to install js backend called 'nodeParsoid' (which is now it's own one-click install)a bidirectional runtime wiki parser. Once you do that you can [httpsThis caused a big software architectural problem: there were two parsers to maintain://freephile.org/node visit the path] you configured for node and you should see the "hello world" app that the installer puts in place. You'll need to stop that app, plus remove the cron job that respawns it. Then, in order to reserve and associate a port for the service, you install another normal' (now 'applegacy'. You do not need to open this port ) core parser in the firewall unless you plan to share it with other instancesPHP, since HTTP talks to and the node server on the backend. Visual Editor parser (I had to export the PORT, but this is no longer necessary if you configure it Parsoid) in localsettings.jsJavaScript.) Depending on the resource constraints of your hosting packageSo, you may need to limit the number of workers spawned by the Parsoid service. It calculates a number based on the number end of processors. For a shared hosting account2019, this is guaranteed Parsoid was ported to exceed your RAM or CPU limitsPHP, so specify and distributed with MediaWiki 1.35 as part of the <code>--num-workers<[mw:Parsoid/code> option unless you're running on a dedicated host or VMParser_Unification|Parser Unification initiative]].
Follow the installation instructions, and remember to edit both LocalSettings== Intro ==* [https://commons.wikimedia.org/w/index.php ?title=File%3AWikimania_2013_-_VisualEditor_-_The_present_and_future_of_editing_our_wikis.webm VIDEO] Wikimania 2013* [https://www.youtube.com/watch?v=M_Ioi1aLAL8 VIDEO] (47 min.) with James Forrester - Product Manager and localsettingsRoan Kattouw - Sr.js When you setup the "interwiki" link to point to your API endpointSoftware Engineer presenting Jan 13, you can choose pretty much whatever name you want to give it2014 at Linux.conf. The example is 'localhost'au on the contentEditable aspects of the system.
The [http://www.mediawiki.org/wiki/VisualEditor Visual Editor] for MediaWiki relies on [[mw:Parsoid|Parsoid]]
You'll want to set/update your $NODE_PATH and $PATH environment variables to locate the installed node modules, and to find the node and npm binaries<source lang="bash"blockquote>export NODE_PATH="$HOME/webapps/node/lib/node_modules:$NODE_PATH"echo 'export NODE_PATH="$HOME/webapps/node/lib/node_modules:$NODE_PATH"' >> $HOME/Parsoid implements a bidirectional wikitext parser and interpreter.bashrcIt converts and interprets wikitext into an annotated HTML DOM, which npmexport PATH="$HOME/webapps/node/bin:$PATH"echo 'export PATH="/$HOME/webapps/node/bin:$PATHcan then be edited with HTML editor tools such as the Visual Editor. It also provides the conversion of a (possibly modified) HTML DOM back to wikitext."' >> $HOME/.bashrc</sourceblockquote>
Once node (and npm) is available, you of course need [http://xml.coverpages.org/ Robin Cover] would be proud. It round-trips wiki to get the parsoid HTML + RDFa and visual_editor extensions. A quick <code>npm install</code> in the parsoid directory sets up all the node machineryback.
To have it run continuously, you might want to use the 'forever' module, but that == Installation ==VisualEditor is just a node way of monitoring processesincluded with MediaWiki. You might want to simply use tools build for the purpose like [[monit]]<source lang="bash">npm install -g forevercd ~See https://webappswww.mediawiki.org/wiki/extensions/Parsoid/forever node api/server.js --num-workers=2 &</source>Extension:VisualEditor
==== Info ====
* https://docs.webfaction.com/software/nodejs.html
== Extensions ==
# [[mw:Extension:VisualEditor]]
# [[mw:Extension:Parsoid]]
 
=== Extensions that hook into VE ===
* https://codesearch-beta.wmcloud.org/things/?q=ve.ui.commandRegistry.register&files=&excludeFiles=&repos=
* https://codesearch-beta.wmcloud.org/extensions/?q=VisualEditorPluginModules&i=nope&files=&repos=
 
Extension authors should register <code>VisualEditorPluginModules</code>
# https://www.mediawiki.org/wiki/Extension:Proofread_Page
# https://www.mediawiki.org/wiki/Extension:CodeMirror (syntax highlighting)
# https://www.mediawiki.org/wiki/Extension:Disambiguator
# https://www.mediawiki.org/wiki/Extension:Graph
# https://www.mediawiki.org/wiki/Extension:Kartographer (Open Street Maps)
# https://www.mediawiki.org/wiki/Extension:LanguageTool
# https://www.mediawiki.org/wiki/Extension:Math
# https://www.mediawiki.org/wiki/Extension:Score (LillyPond)
# https://www.mediawiki.org/wiki/Extension:SyntaxHighlight
# https://www.mediawiki.org/wiki/Extension:TemplateData
# https://www.mediawiki.org/wiki/Extension:WikiHiero
 
 
== Customizing Visual Editor with custom menus, tools, commands ==
* https://www.mediawiki.org/wiki/VisualEditor/Gadgets
* https://www.mediawiki.org/wiki/VisualEditor/Gadgets/Creating_a_custom_command
* https://www.mediawiki.org/wiki/VisualEditor/Gadgets/Add_a_tool
 
== API / Developer Docs / DevOps ==
* https://doc.wikimedia.org/VisualEditor/master/ powered by JSDuck
* http://blog.gmane.org/gmane.science.linguistics.wikipedia.wikitext wikitext-l
 
I [https://gerrit.wikimedia.org/r/#/c/132479/1/api/ParsoidService.js noticed a bug] and it was fixed about 5 minutes after I mentioned it! (Thanks C. Scott Ananian)
{{References}}
[[Category:Wiki]]
[[Category:JavaScript]]