모든 지식의 총합을 위한 자유지식위키, 리프위키
|
|
| (같은 사용자의 중간 판 2개는 보이지 않습니다) |
| 1번째 줄: |
1번째 줄: |
| var customizeToolbar = function () {
| |
| /* Your code goes here */
| |
| $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
| |
| 'section': 'characters',
| |
| 'pages': {
| |
| 'emoticons': {
| |
| 'layout': 'characters',
| |
| 'label': 'Emoticons',
| |
| 'characters':
| |
| "‘’": {
| |
| "action": {
| |
| "type": "encapsulate",
| |
| "options": {
| |
| "pre": "‘",
| |
| "post": "’"
| |
| }
| |
| }
| |
| },
| |
| "“”": {
| |
| "action": {
| |
| "type": "encapsulate",
| |
| "options": {
| |
| "pre": "“",
| |
| "post": "”"
| |
| }
| |
| }
| |
| },
| |
| "’": "’",
| |
| "·": "·",
| |
| "〈〉": {
| |
| "action": {
| |
| "type": "encapsulate",
| |
| "options": {
| |
| "pre": "〈",
| |
| "post": "〉"
| |
| }
| |
| }
| |
| },
| |
| "「」": {
| |
| "action": {
| |
| "type": "encapsulate",
| |
| "options": {
| |
| "pre": "「",
| |
| "post": "」"
| |
| }
| |
| }
| |
| },
| |
| "『』": {
| |
| "action": {
| |
| "type": "encapsulate",
| |
| "options": {
| |
| "pre": "『",
| |
| "post": "』"
| |
| }
| |
| }
| |
| },
| |
| "《》": {
| |
| "action": {
| |
| "type": "encapsulate",
| |
| "options": {
| |
| "pre": "《",
| |
| "post": "》"
| |
| }
| |
| }
| |
| },
| |
| "—": {
| |
| "titleMsg": "special-characters-title-emdash",
| |
| "action": {
| |
| "type": "replace",
| |
| "options": {
| |
| "peri": "—",
| |
| "selectPeri": false
| |
| }
| |
| }
| |
| },
| |
| "⸺": {
| |
| "titleMsg": "special-characters-title-two-emdash",
| |
| "action": {
| |
| "type": "replace",
| |
| "options": {
| |
| "peri": "⸺",
| |
| "selectPeri": false
| |
| }
| |
| }
| |
| },
| |
| "△": "△",
| |
| "▲": "▲",
| |
| "□": "□",
| |
| "■": "■",
| |
| "¹": "¹",
| |
| "²": "²",
| |
| "³": "³",
| |
| "←": "←",
| |
| "→": "→",
| |
| "↑": "↑",
| |
| "↓": "↓",
| |
| "↘": "↘",
| |
| "↗": "↗",
| |
| "⇐": "⇐",
| |
| "⇒": "⇒",
| |
| "⇘": "⇘",
| |
| "⇗": "⇗",
| |
| "☆": "☆",
| |
| "★": "★",
| |
| "㈜": "㈜",
| |
| "틀:del": {
| |
| "action": {
| |
| "type": "encapsulate",
| |
| "options": {
| |
| "pre": "{{del|",
| |
| "post": "}}"
| |
| }
| |
| }
| |
| },
| |
| "\u003Cdel\u003E": {
| |
| "action": {
| |
| "type": "encapsulate",
| |
| "options": {
| |
| "pre": "\u003Cdel\u003E",
| |
| "post": "\u003C/del\u003E"
| |
| }
| |
| }
| |
| },
| |
| "틀:()": {
| |
| "action": {
| |
| "type": "encapsulate",
| |
| "options": {
| |
| "pre": "{{()|",
| |
| "post": "}}"
| |
| }
| |
| }
| |
| }
| |
| };
| |
|
| |
|
| /* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
| |
| if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
| |
| mw.loader.using( 'user.options' ).then( function () {
| |
| // This can be the string "0" if the user disabled the preference ([[phab:T54542#555387]])
| |
| if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
| |
| $.when(
| |
| mw.loader.using( 'ext.wikiEditor' ), $.ready
| |
| ).then( customizeToolbar );
| |
| }
| |
| } );
| |
| }
| |
2025년 6월 1일 (일) 09:46 기준 최신판