[inline:] Short Tag
Built-in feature
[inline:123]
will insert the attached image file having ID 123 as a very simple <img src="...">
tag pointing to the original image file.
The inline [inline:]
tag is a placeholder inserted in the content to be replaced by an image when the post is displayed. That image must be already uploaded to the server and attached to the current Item. The tag can be manually typed into the content by following the required syntax.
[inline:]
short tag generates inline text (<img src="...">
) and can appear anywhere (inside a paragraph, table, etc.)Syntax Breakdown
[inline:
Link ID :.
Class Name(s) ]
TODO [inline:
Link ID [ :
Alt text ] [ :
Size ] [ :.
Class Name(s) ] ]
- Link ID : ID of an attached image to the current Item. This is a number that is automatically created when you attach an image to a post in the Item Images & Attachments Panel. The tag will not be rendered in the following cases:
- If an invalid ID is provided
- If the ID refers to a file that is not an image
- If the ID refers to an image but that image is assigned to any display position other than "Inline".
- Available in an upcoming release Alt text : By default, the image will be displayed with the Alt text that has been entered in the File properties of the linked File. This parameter of the short tag allows you to:
- Override the default Alt text by explicitly specifying one here
Not display any alt text by specifying
-
Note: if the alt text param you specify starts with a.
it will be considered to be a class name (see below),
The Alt text cannot besmall
,medium
,large
ororiginal
, otherwise it will be considered to be the Size (see below).
- TODO Size :
small
,medium
,large
ororiginal
(If omitted, the default isoriginal
) - Class Name(s) : can be any CSS class name. The class name must start with a dot. Multiple class names can be specified, separated by a dot. You may add your own classes.
Samples
[inline:123]
[inline:1234:.top]
: the predefined CSS classtop
aligns the image with the top of the surrounding characters.[inline:1234:.middle]
: the predefined CSS classmiddle
aligns the image with the middle of the surrounding characters.[inline:345:.redborder]
[inline:345:.redborder.squared]
Adding your own CSS classes to style the image
Here is some sample CSS code you could use to define the classes .redborder
(which adds a red border to your image) and .squared
(which removes rounded corners):
img.redborder, .image_block.redborder img { border: 1px solid red }
img.squared, .image_block.squared img { border-radius: 0 }
You can use any method described in How to add custom CSS to define such extra CSS classes. For example you could add this to your Collection’s Skin and Style Panel Panel like this:
Proper placement
This tag renders into a link (<img src="...
) and can be placed almost anywhere.
This tag can be placed inside a link.