Skip to content

Commit d4de356

Browse files
committed
Added <doc.icon> tag
Added <doc.icon> tag for displaying icons in the middle of text.
1 parent 0e13b2a commit d4de356

File tree

5 files changed

+39
-0
lines changed

5 files changed

+39
-0
lines changed

Documentation-Template/Documentation.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
<li class="summarySubItem">Highlighted Words</li>
9292
<ul>
9393
<li><a class="summaryItem" onclick="GoToDivSmoothly(this);" correspondentTopicId="12">How to highlight a word in the middle of a text</a></li>
94+
<li><a class="summaryItem" onclick="GoToDivSmoothly(this);" correspondentTopicId="12a">How to display a little Icon or minuscle Image in the middle of text</a></li>
9495
</ul>
9596
<li class="summarySubItem">Responsive Images</li>
9697
<ul>
@@ -353,6 +354,21 @@
353354
</doc.topic>
354355
<!-- #endregion -->
355356

357+
<!-- #region How to display a little Icon or minuscle Image in the middle of text -->
358+
<doc.topic topicid="12a">
359+
<doc.topictitle>How to display a little Icon or minuscle Image in the middle of text</doc.topictitle>
360+
361+
In some situations, it may be necessary to display an icon, custom emote or maybe a tiny image in the middle of the text. For these cases, use the code below.
362+
<doc.code language="html"><code>
363+
This <doc.icon src="DocumentationFiles/images/some-icon.png"></doc.icon> icon is a PNG in the middle of the text.
364+
</code></doc.code>
365+
And this is the result...
366+
<br>
367+
<br>
368+
This <doc.icon src="DocumentationFiles/images/some-icon.png"></doc.icon> icon is a PNG in the middle of the text.
369+
</doc.topic>
370+
<!-- #endregion -->
371+
356372
<!-- #region Displaying a responsive image with zoom and caption controls -->
357373
<doc.topic topicid="13">
358374
<doc.topictitle>Displaying a responsive image with zoom and caption controls</doc.topictitle>

Documentation-Template/DocumentationFiles/css/all-css-content.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
@import url(tool-tags-style/achiev.css);
2020
@import url(tool-tags-style/code.css);
2121
@import url(tool-tags-style/detach.css);
22+
@import url(tool-tags-style/icon.css);
2223
@import url(tool-tags-style/frame.css);
2324
@import url(tool-tags-style/image.css);
2425
@import url(tool-tags-style/info.css);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.toolTagIcon{
2+
display: inline;
3+
background-color: transparent;
4+
padding-left: 2px;
5+
padding-right: 2px;
6+
padding-bottom: 0px;
7+
padding-top: 0px;
8+
}
9+
.toolTagIcon img{
10+
height: 16px;
11+
width: auto;
12+
margin-bottom: -3px;
13+
}
3.7 KB
Loading

Documentation-Template/DocumentationFiles/js/javascript-core.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,15 @@ function RunPostProcessOfAllToolsTags() {
676676
currentItem.innerHTML = "<div class=\"toolTagDetach\">" + content + "</div>";
677677
}
678678

679+
//icon
680+
temporaryTags = document.getElementsByTagName("doc.icon");
681+
for (var i = 0; i < temporaryTags.length; i++) {
682+
var currentItem = temporaryTags[i];
683+
if (isInsideCodeTag(currentItem) == true) //<-- Ignore this item, if is inside of CODE tag
684+
continue;
685+
currentItem.innerHTML = "<div class=\"toolTagIcon\"><img src=\"" + currentItem.getAttribute("src") + "\" /></div>";
686+
}
687+
679688
//image
680689
temporaryTags = document.getElementsByTagName("doc.image");
681690
for (var i = 0; i < temporaryTags.length; i++) {

0 commit comments

Comments
 (0)