Difference between revisions of "Visual editor"

From Freephile Wiki
Jump to navigation Jump to search
(Created page with "The visual editor in mediawiki relies on the parsoid extension, which brings node.js to mediawiki. To install the visual editor extension in a webfaction account, you need to...")
 
(adding info)
Line 1: Line 1:
The visual editor in mediawiki relies on the parsoid extension, which brings node.js to mediawiki.  To install the visual editor extension in a webfaction account, you need to first have node installed and working.  You can do this by using the [http://docs.webfaction.com/software/custom.html installer in your webfaction panel] and associating a path with the app for a domain.
+
The [http://www.mediawiki.org/wiki/VisualEditor Visual Editor] for MediaWiki relies on the '''Parsoid''' extension <ref>[https://git.wikimedia.org/tree/mediawiki%2Fextensions%2FParsoid Parsoid extension]</ref>. 
 +
 
 +
<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>
 +
 
 +
Robin Cover would be proud.  It round-trips wiki to HTML and back.
 +
 
 +
Parsoid brings node.js to mediawiki.  To install the visual editor extension in a webfaction account, you need to first have node installed and working.  You can do this by using the [http://docs.webfaction.com/software/custom.html installer in your webfaction panel] and associating a path with the app for a domain.
  
 
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
 
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
Line 10: Line 19:
 
</source>
 
</source>
  
Once node (and npm) is available, you of course need to get the parsoid and visual_editor extensions.  A quick <code>npm install</code> in the parsoid directory sets up all the node machinery
+
Once node (and npm) is available, you of course need to get the parsoid and visual_editor extensions.  A quick <code>npm install</code> in the parsoid directory sets up all the node machinery.
 +
 
 +
== API / Developer Documentation ==
 +
* 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)
  
 
[[Category:Wiki]]
 
[[Category:Wiki]]

Revision as of 14:13, 9 May 2014

The Visual Editor for MediaWiki relies on the Parsoid extension [1].

"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."

Robin Cover would be proud. It round-trips wiki to HTML and back.

Parsoid brings node.js to mediawiki. To install the visual editor extension in a webfaction account, you need to first have node installed and working. You can do this by using the installer in your webfaction panel and associating a path with the app for a domain.

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

export NODE_PATH="$HOME/webapps/node/lib/node_modules:$NODE_PATH"
echo 'export NODE_PATH="$HOME/webapps/node/lib/node_modules:$NODE_PATH"' >> $HOME/.bashrc
which npm
export PATH="$HOME/webapps/node/bin:$PATH"
echo 'export PATH="/$HOME/webapps/node/bin:$PATH"' >> $HOME/.bashrc

Once node (and npm) is available, you of course need to get the parsoid and visual_editor extensions. A quick npm install in the parsoid directory sets up all the node machinery.

API / Developer Documentation[edit | edit source]

I noticed a bug and it was fixed about 5 minutes after I mentioned it! (Thanks C. Scott Ananian)