如何在Dokuwiki中为图像添加替代文本?

时间:2015-03-16 13:15:16

标签: syntax alt dokuwiki

这是我的图像语法......

[{{:image-link.png?200 |这是标题。}}]

添加图像,右对齐。

非常感谢您的帮助......谢谢!

2 个答案:

答案 0 :(得分:1)

您引用的DokuWiki语法显示您使用的是Image box plugin - 它允许使用标题,但会生成一个空白 alt 标记。

e.g。 [{{ :software:contao:contao_install_open_sauce_00.png |Layout -> Themes -> Themes Import}}]

呈现HTML: - <div class="thumb2 tcenter" style="width:100%"><div class="thumbinner"><a href="/business/lib/exe/detail.php?id=software%3Acontao%3Acontao_4&amp;media=software:contao:contao_install_open_sauce_00.png" class="media" title="software:contao:contao_install_open_sauce_00.png"><img exify_intitialized="true" src="/business/lib/exe/fetch.php?media=software:contao:contao_install_open_sauce_00.png" class="mediabox2" alt=""></a><div class="thumbcaption"><strong>Layout </strong>→<strong> Themes </strong>→<strong> Themes Import</strong></div></div></div>

并创建一个boxed image with a caption(维基百科样式)和一个空 alt 标记。

因此,您可以使用Imagebox插件填充 alt 字段,但您可以使用[内置]填充 alt 字段图片标签] [3]。由内置图片标记生成的 alt 标记由您提供给(工具提示)“标题”的值填充。

e.g。 {{ wiki:dokuwiki-128.png |This is the caption}}(参见:wiki:syntax#media_files)

呈现HTML <a href="/_detail/wiki:dokuwiki-128.png?id=wiki%3Asyntax" class="media" title="wiki:dokuwiki-128.png"><img exify_intitialized="true" src="/_media/wiki:dokuwiki-128.png" class="mediacenter" title="This is the caption" alt="This is the caption"></a>

如果要同时使用标题标记(工具提示)和其他 alt 标记,则需要在DokuWiki中启用HTML并使用HTML添加图像。< / p>

答案 1 :(得分:0)

你所做的应该已经成功为图像提供了替代文字(没有标题!),除了你不需要外部方形支架:

{{ :image-link.png?200|This is the alt-text.}}

如果你想要一个标题,你应该看一些插件,如the box plugin

最后,如果您想要一个包含alt-text的图像中的链接,只需使用类似

的内容
[[www.theaddress.it|{{ :image-link.png?200|This is the alt-text.}}]]
相关问题