|
|
| Line 1: |
Line 1: |
| <h2>IMPORTED REVISION FROM WIKISPACES</h2>
| | Using CSS and JavaScript, it is possible to have some additional control over the formatting of wiki pages that may not be possible with the tools provided by the standard interface. |
| This is an imported revision from Wikispaces. The revision metadata is included below for reference:<br>
| |
| : This revision was by author [[User:spt3125|spt3125]] and made on <tt>2014-01-06 21:21:04 UTC</tt>.<br>
| |
| : The original revision id was <tt>480987530</tt>.<br>
| |
| : The revision comment was: <tt></tt><br>
| |
| The revision contents are below, presented both in the original Wikispaces Wikitext format, and in HTML exactly as Wikispaces rendered it.<br>
| |
| <h4>Original Wikitext content:</h4>
| |
| <div style="width:100%; max-height:400pt; overflow:auto; background-color:#f8f9fa; border: 1px solid #eaecf0; padding:0em"><pre style="margin:0px;border:none;background:none;word-wrap:break-word;white-space: pre-wrap ! important" class="old-revision-html">Using CSS and JavaScript, it is possible to have some additional control over the formatting of wiki pages that may not be possible with the tools provided by the standard interface.
| |
|
| |
|
| For example, Wikispaces offers few options for formatting tables. Let's say we want to add some padding to a table. The following code, inserted into an "Other HTML" Widget anywhere on the page, should do the trick: | | For example, Wikispaces offers few options for formatting tables. Let's say we want to add some padding to a table. The following code, inserted into an "Other HTML" Widget anywhere on the page, should do the trick: |
| [[code]]
| | |
| <script type="text/javascript"> | | <pre><script type="text/javascript"> |
| /*<![CDATA[*/ | | /*<![CDATA[*/ |
| document.write('<style type="text/css"> .wiki_table td { padding: 5px; } <\/style>'); | | document.write('<style type="text/css"> .wiki_table td { padding: 5px; } <\/style>'); |
| /*]]>*/ | | /*]]>*/ |
| </script> | | </script></pre> |
| [[code]]
| |
| | |
| Other elements may perhaps be styled in this manner as well. Some trial and error and inspection of the page source will likely be needed to determine the proper ids and classes to use. Use the [[sandbox]] for experimentation.</pre></div>
| |
| <h4>Original HTML content:</h4>
| |
| <div style="width:100%; max-height:400pt; overflow:auto; background-color:#f8f9fa; border: 1px solid #eaecf0; padding:0em"><pre style="margin:0px;border:none;background:none;word-wrap:break-word;width:200%;white-space: pre-wrap ! important" class="old-revision-html"><html><head><title>Advanced formatting of wiki pages</title></head><body>Using CSS and JavaScript, it is possible to have some additional control over the formatting of wiki pages that may not be possible with the tools provided by the standard interface.<br />
| |
| <br />
| |
| For example, Wikispaces offers few options for formatting tables. Let's say we want to add some padding to a table. The following code, inserted into an &quot;Other HTML&quot; Widget anywhere on the page, should do the trick:<br />
| |
| <!-- ws:start:WikiTextCodeRule:0:
| |
| &lt;pre class=&quot;text&quot;&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br/&gt;/*&amp;lt;![CDATA[*/&lt;br/&gt;document.write('&amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt; .wiki_table td { padding: 5px; } &amp;lt;\/style&amp;gt;');&lt;br/&gt;/*]]&amp;gt;*/&lt;br/&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
| |
| -->
| |
| <style type="text/css"><!--
| |
| /**
| |
| * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
| |
| * (http://qbnz.com/highlighter/ and http://geshi.org/)
| |
| */
| |
| .text {font-family:monospace;}
| |
| .text .imp {font-weight: bold; color: red;}
| |
| .text span.xtra { display:block; }
| |
| | |
| -->
| |
| </style><pre class="text">&lt;script type=&quot;text/javascript&quot;&gt;
| |
| /*&lt;![CDATA[*/
| |
| document.write('&lt;style type=&quot;text/css&quot;&gt; .wiki_table td { padding: 5px; } &lt;\/style&gt;');
| |
| /*]]&gt;*/
| |
| &lt;/script&gt;</pre>
| |
|
| |
|
| <!-- ws:end:WikiTextCodeRule:0 --><br />
| | Other elements may perhaps be styled in this manner as well. Some trial and error and inspection of the page source will likely be needed to determine the proper ids and classes to use. Use the [[SandBox|sandbox]] for experimentation. |
| Other elements may perhaps be styled in this manner as well. Some trial and error and inspection of the page source will likely be needed to determine the proper ids and classes to use. Use the <a class="wiki_link" href="/sandbox">sandbox</a> for experimentation.</body></html></pre></div> | | [[Category:wiki_help]] |