Rich Text Editor for MediaWikiMaciej Brencz Inez Korczyski
Goals
easier way of editing MediaWiki articles (WYSIWYG) compatibility with wikitext format
2
WYSIWYG editing
We're using CKEditor 3.23
Wikitext and HTML: back & forthMW Parser
Wikitext'''foo''' [[Foo|Bar]]
HTMLfoo Bar
ReverseParser4
Wikitext and HTML: problems
Wikitext'''foo''' foo {{boldit|foo}}
HTMLfoo
?5
Wikitext and HTML: RTE approachModified MW ParserLinker Preprocessor Sanitizer
Wikitext'''foo''' foo {{boldit|foo}}
HTML in RTEfoo foo
ReverseParser6
Wikitext and HTML: modificationsWe modify HTML returned by MW parser by adding extra attributes:
_rte_data stores JSON encoded meta-data _rte_washtml indicates given node was rendered from HTML in wikitext _rte_attributes stores HTML attributes to preserve their order and formatting ...7
Placeholders
handle elements which are hard to be fully wysiwygable extra HTML attribute stores placeholder's data parser hooks magic words templates comments8
Not editable elements
templates and images output complex HTML [[Image:foo|thumb| caption]] is rendered as single element templates are handled as placeholders idea to use screenshots of templates9
Edgecases
[[Image|[[LinkInDesc]]]] {{temp{{temp}}11}} [[Muppet]] (although we support some comments use cases)
RTE will fallback to source mode10
Rich Text Editor: features
11
Rich Text Editor: features
12
Rich Text Editor: features
13
Rich Text Editor: The Future
in article editing (section editing) visual templates better handling of parser hooks (parameters detection & editing)
14
Rich Text Editor: test site
http://communitytest.wikia.com
15
Thank you!
Q&A16