Difference between revisions of "MediaWiki/Tags for Controls"
AngelHerraez (talk | contribs) |
AngelHerraez (talk | contribs) |
||
Line 21: | Line 21: | ||
'''Important:''' the content of the <code>target</code> subtag must match the content of the <code>name</code> subtag of the <code>jmolApplet</code> on which the action is desired. | '''Important:''' the content of the <code>target</code> subtag must match the content of the <code>name</code> subtag of the <code>jmolApplet</code> on which the action is desired. | ||
+ | |||
+ | Note: initial spaces are '''not''' allowed in some of the subtag contents. | ||
Many of the 3rd and 4th-level subtags are optional and will take default values based on the sibling subtags (e.g. text defaults to the first characters of script). | Many of the 3rd and 4th-level subtags are optional and will take default values based on the sibling subtags (e.g. text defaults to the first characters of script). | ||
− | |||
− | |||
− | |||
− | |||
== jmolLink == | == jmolLink == | ||
Will include as 3rd-level subtags | Will include as 3rd-level subtags | ||
<code>target</code>, <code>text</code>, <code>script</code> | <code>target</code>, <code>text</code>, <code>script</code> | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 51: | Line 48: | ||
</jmol> | </jmol> | ||
|} | |} | ||
− | + | ||
+ | == jmolButton == | ||
+ | Will include as 3rd-level subtags | ||
+ | <code>target</code>, <code>text</code>, <code>script</code> | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Example code: !! Renders: | ||
+ | |- | ||
+ | | | ||
+ | <jmol> | ||
+ | <jmolButton> | ||
+ | <text>ball and stick</text> | ||
+ | <script>spacefill on;</script> | ||
+ | </jmolButton> | ||
+ | </jmol> | ||
+ | || | ||
+ | <jmol> | ||
+ | <jmolButton> | ||
+ | <text>ball and stick</text> | ||
+ | <script>spacefill 23%; wireframe 0.15;</script> | ||
+ | </jmolButton> | ||
+ | </jmol> | ||
+ | |} | ||
== jmolCheckbox == | == jmolCheckbox == |
Revision as of 18:32, 22 April 2024
Contents
Tags in the Jmol Extension for MediaWiki that will include controls to act on models
A model to test action of the controls below |
All these tags will insert controls in the page at the same time the page is being loaded. The controls allow the user to apply a script, included in the tag, to the model displayed in a JSmol panel.
These tags must be surrounded by a <jmol> </jmol>
tag pair and will act on a model created by a jmolApplet
subtag.
Several 2nd-level subtags maybe enclosed in a single <jmol> </jmol>
tag pair, but no line breaks will be offered.
Important: the content of the target
subtag must match the content of the name
subtag of the jmolApplet
on which the action is desired.
Note: initial spaces are not allowed in some of the subtag contents.
Many of the 3rd and 4th-level subtags are optional and will take default values based on the sibling subtags (e.g. text defaults to the first characters of script).
jmolLink
Will include as 3rd-level subtags
target
, text
, script
Example code: | Renders: |
---|---|
<jmol> <jmolLink> <text>spacefill</text> <script>spacefill on;</script> </jmolLink> </jmol> |
|
jmolButton
Will include as 3rd-level subtags
target
, text
, script
Example code: | Renders: |
---|---|
<jmol> <jmolButton> <text>ball and stick</text> <script>spacefill on;</script> </jmolButton> </jmol> |
|
jmolCheckbox
Will include as 3rd-level subtags
target
, text
, scriptWhenChecked
, scriptWhenUnchecked
, checked
jmolMenu
Will include as 3rd-level subtags
target
, menuheight
and several item
's
Each item
subtag will include 4th-level subtags:
text
, script
and, only in one of them, checked
jmolRadioGroup
Will include as 3rd-level subtags
target
, vertical
and several item
's
Each item
subtag will include 4th-level subtags:
text
, script
and, only in one of them, checked
<< Back to the index page of the Extension.