편집 요약 없음
편집 요약 없음
1번째 줄: 1번째 줄:
<onlyinclude><div style="
<onlyinclude><includeonly><div style="
{{#switch:{{{정렬|{{{4|}}}}}}
{{#switch:{{{정렬|{{{4|}}}}}}
|center = width: min-content;margin: 0 auto;
|center = width: min-content;margin: 0 auto;
|right = float: right;
|right = float: right;
|left = float: left;}}">{{#tag:youtube|{{{1<includeonly>|</includeonly>}}}|width={{{2|}}}|height={{{3|}}}}}</div></onlyinclude>
|left = float: left;}}">{{#tag:youtube|{{{1|}}}|width={{{2|}}}|height={{{3|}}}}}</div></includeonly></onlyinclude>
-----
 
사용법 : 유튜브 주소 <nowiki>https://www.youtube.com/watch?v=</nowiki>'''asdfqwer'''에서
== 사용법 ==
<nowiki>{{YouTube|'''asdfqwer'''}}</nowiki>
유튜브 주소 중 ?v 뒤에 있는 코드를 넣어주세요.
-----
<nowiki>https://www.youtube.com/watch?v=</nowiki>'''asdfqwer''' -> <nowiki>{{YouTube|asdfqwer}}</nowiki>
예시 : {{YouTube|cquvA_IpEsA}}
 
<templatedata>
{
"params": {
"1": {
"label": "영상 코드",
"example": "cquvA_IpEsA",
"description": "영상의 코드를 입력합니다. 주소가 https://www.youtube.com/watch?v=cquvA_IpEsA 일때 'cquvA_IpEsA'를 입력하면 됩니다.",
"type": "string",
"required": true
},
"2": {
"label": "width",
"description": "영상의 폭을 지정합니다. px를 입력하지 않습니다.",
"example": "400",
"type": "number"
},
"3": {
"label": "height",
"description": "영상의 높이를 지정합니다. px를 입력하지 않습니다.",
"example": "240",
"type": "number"
},
"4": {
"aliases": [
"정렬"
],
"label": "정렬",
"description": "영상의 정렬을 지정합니다.",
"example": "(빈칸), left, center, right",
"type": "string"
}
},
"description": "유튜브 영상을 삽입합니다.",
"format": "inline"
}
</templatedata>
 
== 예시 ==
{{YouTube|cquvA_IpEsA}}
{{-}}
{{-}}
{{YouTube|cquvA_IpEsA|||left}}
{{YouTube|cquvA_IpEsA|||left}}