##작성일: [[Date(2014-11-11T09:05:03)]] [[TableOfContents]] == CodeMacro == 인라인 태그를 생성하는 MoniWiki 매크로 플러그인입니다. 텍스트를 고정폭 글꼴로 강조 표시하며, CSS 클래스나 글자 색상을 지정할 수 있습니다. == 설치 방법 == === Code.php === ##https://raw.githubusercontent.com/yhyacinth/moniwiki-hyacinthwiki/master/plugin/Code.php Code.php 파일을 plugin/ 디렉토리에 복사합니다. {{{#!vim sh plugin/ └── Code.php }}} 별도의 설정은 필요하지 않으며, MoniWiki가 plugin/ 디렉토리에서 자동으로 매크로를 인식합니다. == 사용법 == {{{ [[Code(내용)]] }}} == 옵션 == {{{#!markdown | 옵션 | 형식 | 설명 | | ----- | --------------------------- | --------------------------------- | | 없음 | `[[Code(내용)]]` | `class="fixed"`가 적용된 기본 코드 태그 | | class | `[[Code(내용,{class:클래스명})]]` | 지정한 CSS 클래스를 적용 | | color | `[[Code(내용,{color:색상값})]]` | `class="fixed"`과 함께 지정한 글자 색상을 적용 | }}} - class와 color를 동시에 지정하면 class가 우선 적용됩니다. == 예시 == {{{+1 기본 사용 }}} {{{ [[Code(hello world)]] }}} 출력: [[Code(hello world)]] {{{+1 색상 지정 }}} {{{ [[Code(에러 발생,{color:red})]] [[Code(성공,{color:#28a745})]] }}} 출력: [[Code(에러 발생,{color:red})]] [[Code(성공,{color:#28a745})]] {{{+1 CSS 클래스 지정 }}} {{{ [[Code(import os,{class:python})]] }}} 출력: [[Code(import os,{class:python})]] ---- CategoryMacro