Can you easily configure MediaWiki to accept full HTML/CSS or even JS content?
Asked Answered
C

3

9

I'd like to create a technical wiki site and it requires the full use of HTML/CSS and maybe Javascript when editing a page. Is this something I can easily configure in MediaWiki? If not, is there any other wiki software that you'd recommend?

Thanks!

Costin answered 20/7, 2009 at 23:20 Comment(0)
D
10

You can enable raw HTML support by setting $wgRawHtml = true; in your LocalSettings.php:

http://www.mediawiki.org/wiki/Manual:$wgRawHtml

However, as noted above this is rather insecure for a public site. (If locked down to registered usage only by known folks it's ok -- but you need to trust your users.)

There are some links on that manual page to extensions organized around letting you put specific known bits of HTML/JS in your output code as well, which may or may not fit your needs better.

Donative answered 21/7, 2009 at 18:9 Comment(0)
M
0

Well, while MediaWiki itself does not support this, there are some extensions which allow at least HTML in a page. See for example this extension list. SecureHTML might so what you are looking for.

That said, I'd like to point out that allowing raw HTML rather defeats the purpose of a wiki:

  • it can and will mess up formatting and create weird problems (clashes between generated and user-provided HTML)
  • it makes it hard/impossible to convert the wiki to other formats (such as to print it)
  • it makes searching harder
  • it makes any kind of security impossible (think XSS)

This is doubly true for allowing Javascript.

So I'd like to ask why you need this. If you need special formatting that MediaWiki does not offer, consider using (or writing) an extension for this.

If you really need arbitrary HTML, a Wiki might not be the best tool for you. You should consider a CMS, or just put HTML files into Subversion.

So what are you trying to do?

Maddock answered 20/7, 2009 at 23:58 Comment(0)
R
0

Use nowiki tags. Docs can be found here: https://www.mediawiki.org/wiki/Help:Formatting

enter image description here

Respirable answered 9/6, 2022 at 14:6 Comment(1)
At home I use Zimwiki, and Notion.Respirable

© 2022 - 2025 — McMap. All rights reserved.