6,514
回編集
(一部内容を最新の記述方法に合わせて更新) |
(ミス修正、<ref>タグも挿入できるように変更) |
||
35行目: | 35行目: | ||
'label': '編集用テンプレート', | 'label': '編集用テンプレート', | ||
'characters': [ | 'characters': [ | ||
{ | |||
label: '{{注釈}}', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{注釈|', | |||
post: '}}' | |||
} | |||
} | |||
}, | |||
{ | |||
label: '<ref></ref>', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '<ref>', | |||
post: '</ref>' | |||
} | |||
} | |||
}, | |||
{ | |||
label: '<ref name=""></ref>', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '<ref name="">', | |||
post: '</ref>' | |||
} | |||
} | |||
}, | |||
{ | { | ||
label: '{{要出典}}', | label: '{{要出典}}', | ||
187行目: | 217行目: | ||
], | ], | ||
rows: [ | rows: [ | ||
{ | { | ||
description: { html: '脚注の表示' }, | description: { html: '脚注の表示' }, | ||
syntax: { html: '<span style="cursor:pointer;" onclick="insertTags(\'== 注釈 ==\\n<references />\')">== 注釈 ==<br><references group="注釈" /></span><br><span style="cursor:pointer;" onclick="insertTags(\'== 出典 ==\\n<references />\')">== 出典 ==<br><references /></span>' }, | syntax: { html: '<span style="cursor:pointer;" onclick="insertTags(\'== 注釈 ==\\n<references group="注釈" />\')">== 注釈 ==<br><references group="注釈" /></span><br><span style="cursor:pointer;" onclick="insertTags(\'== 出典 ==\\n<references />\')">== 出典 ==<br><references /></span>' }, | ||
result: { html: '<h2>注釈</h2><ol class="references"><li id="cite_note-test-0"><span class="mw-cite-backlink"><a href="#">^</a></span> <span class="reference-text">注釈テキスト</span></li></ol><h2>出典</h2><ol class="references"><li id="cite_note-test-0"><span class="mw-cite-backlink"><a href="#">^</a></span> <span class="reference-text">出典テキスト</span></li></ol>' } | result: { html: '<h2>注釈</h2><ol class="references"><li id="cite_note-test-0"><span class="mw-cite-backlink"><a href="#">^</a></span> <span class="reference-text">注釈テキスト</span></li></ol><h2>出典</h2><ol class="references"><li id="cite_note-test-0"><span class="mw-cite-backlink"><a href="#">^</a></span> <span class="reference-text">出典テキスト</span></li></ol>' } | ||
}, | }, |
回編集