Help:Advanced formatting of wiki pages: Difference between revisions

Xenwolf (talk | contribs)
Content was old and only applicable to the Wikispaces, I started to update for the current setup
Xenwolf (talk | contribs)
extended
Line 1: Line 1:
Using [[CSS]] and [[JavaScript]] is in theory possible for MediaWiki-based wikis, it has to be configured on the server.
[[CSS]] and [[JavaScript]] is generally involved in MediaWiki-based Wikis. But while inline CSS is permitted, inline JavaScript is not available.  


Inline-CSS is possible for all HTML-tags supported by MediaWiki (some have to be first enabled on the server), for example <code>tt</code>, <code>code</code>, <code>pre</code>, <code>div</code>, <code>span</code> etc. can be used whereas <code>a</code> or <code>img</code> can not.
Most HTML tags for example <code>tt</code>, <code>code</code>, <code>pre</code>, <code>div</code>, <code>span</code> etc. can be directly embedded in the Wiki markup, some HTML tags (for example <code>a</code> or <code>img</code>) can not. For the allowed tags, you can define inline-CSS by setting the <code>style</code> attribute for instance <code><nowiki><span style="border: 1px solid grey; padding: 0 1em">framed sometext</span></nowiki></code> which is rendered like this <span style="border: 1px solid grey; padding: 0 1em">framed sometext</span>.


Use the [[SandBox|sandbox]] for experimentation or start a page in the user namespace, IOW as a subpage of your user page, for example <code>User:Me/Sandbox</code>.
User-defined CSS and JavaScript is enabled for the XenWiki. If your personal solutions turn out to be useful for the overall wiki, it will potentially integrated into the site-wide styles or scripts.
* <code>[[Special:MyPage/common.css|User:''YourName''/common.css]]</code>
* <code>[[Special:MyPage/common.js|User:''YourName''/common.js]]</code>
 
Use the [[SandBox]] for experimentation or start a page in the user namespace, IOW as a subpage of your user page, for example <code>[[Special:MyPage/Sandbox|User:''YourName''/Sandbox]]</code>.
 
== See also ==
* [[JavaScript]]
 
== External links ==
* [https://de.wikipedia.org/wiki/Cascading_Style_Sheets Cascading Style Sheets – Wikipedia]
* [https://www.w3schools.com/css/ CSS Tutorial]
* [https://en.wikipedia.org/wiki/JavaScript JavaScript &#45; Wikipedia]
* [https://www.mediawiki.org/wiki/Gadget_kitchen Gadget kitchen &#45; MediaWiki]
* [https://www.mediawiki.org/wiki/Learning_JavaScript Learning JavaScript &#45; MediaWiki]


[[Category:wiki_help]]
[[Category:wiki_help]]