is there a way I can let members add external images which align right and a set width? I can do this with the image bbcode but I want it aligned right (or left) and with a set max width. (only for the wiki)
You have a couple of different ways to do it...
Going into HTML mode would be the most efficient obviously, just wrapping a div with style around the bbcode entered.
You could create two templates, an opening and closing one, doing different things that you want to achieve.
A wikipage has a clear identifier already for use to preface all CSS with, being #
wikiPage. Use that prefacing all CSS and you won't have any issue, ie. #wikiPage .primaryContent img { } which would obviously isolate all images on the wikipage within the primary content area only, which is your target.
If members cannot use HTML in wikipages, then you'll have to do it via multiple templates, example:
Create a generic ending [template=divclose][/divclose] which would contain a closing div.
Then create multiple templates all covering what you want to achieve, ie. standard sizes, floated right or left, containing the opening div with either class or style properties entered directly into it.
When you enter an image, wrap these template bbcodes before and after the image bbcode that xenforo uses when uploading an image and inserting it.
So your bbcode may look something like:
dofr = Div Open Float Right
Code:
[template=dofr][/template][ATTACH=full]5475[/ATTACH][template=divclose][/template]
Again, you can either enter the CSS into the template, or place it in the extra.css (my recommendation). So the contents of dofr template could be:
The css would be anything you then wanted, ie. float right, some padding for text, maybe standard image height, etc.
Code:
.dofr {
float: right;
height: 300px !important; /* overrides any XF thumbnail or full size css */
padding: 0 0 10px 10px; /* pushing text away from image edge and footer only */
}
You get the idea... but it can be done without to many complications, and can be done in a multitude of ways... HTML directly would be the simplest and least work.
You then just compile a list of standard templates or inputs outlining what they achieve for users to use.