ckeditor: #377 에 따른 단축키 일람 처리

This commit is contained in:
whitedot
2013-03-15 15:01:35 +09:00
parent c3a0d85528
commit 1a1f71d23b
4 changed files with 118 additions and 16 deletions

View File

@ -8,6 +8,13 @@ function editor_html($id, $content, $ckeditor=true, $class="")
$html = "";
$html .= "<span class=\"sound_only\">웹에디터 시작</span>";
$html .= "<div class=\"cke_sc\"><button type=\"button\" class=\"btn_cke_sc\">단축키 일람</button></div>";
ob_start();
include_once("shortcut.php");
$html .= ob_get_contents();
ob_end_clean();
if ($js) {
$html .= "\n".'<script src="'.G4_CKEDITOR_URL.'/ckeditor.js"></script>';
$html .= "\n".'<script>var g4_ckeditor_url = "'.G4_CKEDITOR_URL.'";</script>';
@ -18,6 +25,11 @@ function editor_html($id, $content, $ckeditor=true, $class="")
$ckeditor_class = $ckeditor ? "ckeditor" : "";
$html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$ckeditor_class $class\" style=\"width:100%;\">$content</textarea>";
$html .= "\n<span class=\"sound_only\">웹 에디터 끝</span>";
$html .= "\n<script>";
$html .= "$('.btn_cke_sc').click(function(){";
$html .= "$('.cke_sc_def').toggleClass('cke_sc_def_on');";
$html .= "\n});";
$html .= "\n</script>";
return $html;
}

93
bbs/ckeditor/shortcut.php Normal file
View File

@ -0,0 +1,93 @@
<div class="cke_sc_def">
<dl>
<dt>CTRL+Z</dt>
<dd>취소하기</dd>
<dt>CTRL+Y</dt>
<dd>다시 실행</dd>
<dt>CTRL+B</dt>
<dd>글자 굵게</dd>
<dt>CTRL+I</dt>
<dd>글자 기울이기</dd>
<dt>CTRL+E</dt>
<dd>가운데 정렬</dd>
<dt>CTRL+L</dt>
<dd>왼쪽 정렬</dd>
<dt>CTRL+R</dt>
<dd>오른쪽 정렬</dd>
<dt>CTRL+J</dt>
<dd>양쪽정렬</dd>
<dt>ALT+E</dt>
<dd>이모티콘 넣기</dd>
<dt>ALT+C</dt>
<dd>특수문자 넣기</dd>
<dt>CTRL+Q</dt>
<dd>순서 없는 목록</dd>
<dt>CTRL+SHIFT+8</dt>
<dd>순서 없는 목록 스타일</dd>
<dt>CTRL+7</dt>
<dd>순서 있는 목록</dd>
<dt>CTRL+SHIFT+7</dt>
<dd>순서 있는 목록 스타일</dd>
<dt>CTRL+M</dt>
<dd>인용문 문단</dd>
<dt>CTRL+8</dt>
<dd>들여쓰기</dd>
<dt>CTRL+SHIFT+M</dt>
<dd>내어쓰기</dd>
<dt>CTRL+SPACE</dt>
<dd>포맷 없애기</dd>
<dt>CTRL+A</dt>
<dd>전체선택</dd>
<dt>CTRL+SHIFT+X</dt>
<dd>취소선</dd>
<dt>CTRL+COMMA</dt>
<dd>아래첨자</dd>
<dt>CTRL+PERIOD</dt>
<dd>위첨자</dd>
<dt>CTRL+U</dt>
<dd>밑줄긋기</dd>
<dt>ALT+A</dt>
<dd>책갈피 만들기</dd>
<dt>ALT+F</dt>
<dd>플래쉬 넣기</dd>
<dt>ALT+H</dt>
<dd>구분선 넣기</dd>
<dt>ALT+I</dt>
<dd>이미지 넣기</dd>
<dt>ALT+L</dt>
<dd>바로가기 만들기</dd>
<dt>ALT+SHIFT+L</dt>
<dd>바로가기 없애기</dd>
<dt>ALT+ENTER</dt>
<dd>페이지 나누기</dd>
<dt>ALT+T</dt>
<dd>테이블 만들기</dd>
<dt>ALT+O</dt>
<dd>템플릿 적용</dd>
<dt>F1</dt>
<dd>도움말 보기</dd>
<dt>ALT+#3</dt>
<dd>색상선택기</dd>
<dt>ALT+M</dt>
<dd>복사 잘라내기 붙여넣기 메뉴</dd>
<dt>ALT+F11</dt>
<dd>요소 경로 포커스</dd>
<dt>CTRL+SHIFT+F</dt>
<dd>찾기</dd>
<dt>ALT+X</dt>
<dd>에디터 전체크기 설정/해제</dd>
<dt>CTRL+F2</dt>
<dd>미리보기</dd>
<dt>CTRL+SHIFT+P</dt>
<dd>인쇄하기</dd>
<dt>CTRL+H</dt>
<dd>찾기 바꾸기</dd>
<dt>ALT+SHIFT+T</dt>
<dd>테두리보기</dd>
<dt>ALT+Z</dt>
<dd>소스보기</dd>
<dt>ALT+F10</dt>
<dd>툴바로 이동</dd>
</dl>
<button type="button" class="btn_cke_sc">닫기</button>
</div>

View File

@ -13,7 +13,7 @@ input[type=text],
input[type=password],
input[type=submit],
input[type=image] {-webkit-appearance:none}
button {border-radius:0;-webkit-appearance:none}
button {border-radius:0;font-size:1em;-webkit-appearance:none}
p {margin:0;padding:10px 0;line-height:1.7em;word-break:break-all}
hr {display:none}
pre {overflow-x:scroll;font-size:1.1em}
@ -40,6 +40,18 @@ a:active {color:#000;text-decoration:underline}
#captcha_mp3 img {border:1px solid #cfded8;border-left:0;background:#494949}
#mp3_embed {position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden} /* 익스 8 이하에서 음성캡챠 실행 스타일 */
/* ckeditor 단축키 */
div.cke_sc {margin:0 0 5px;text-align:right}
.btn_cke_sc{display:inline-block;padding:0 10px;height:23px;border:1px solid #ccc !important;background:#fafafa !important;color:#000 !important;text-decoration:none !important;line-height:1.9em;vertical-align:middle}
.cke_sc_def {display:none;margin:0 0 5px;padding:10px;border:1px solid #ccc;background:#f7f7f7;text-align:center}
.cke_sc_def dl{margin:0 0 5px;text-align:left;zoom:1}
.cke_sc_def dl:after {display:block;visibility:hidden;clear:both;content:""}
.cke_sc_def dt,
.cke_sc_def dd {float:left;margin:0;padding:5px 0;border-bottom:1px solid #e9e9e9}
.cke_sc_def dt {width:20%;font-weight:bold}
.cke_sc_def dd {width:30%}
.cke_sc_def_on {display:block !important}
/* 상단 레이아웃 */
#hd {height:73px;border-top:3px solid #151515;border-bottom:1px solid #e7f1ed;background:#fff}
#hd h1 {width:1px;height:1px;font-size:0;line-height:0;overflow:hidden}

View File

@ -161,21 +161,6 @@ if ($is_admin)
}
?>
with (document.fwrite)
{
if (typeof(wr_name) != "undefined")
wr_name.focus();
else if (typeof(wr_subject) != "undefined")
wr_subject.focus();
else if (typeof(wr_content) != "undefined")
wr_content.focus();
if (typeof(ca_name) != "undefined")
if (w.value == "u") {
ca_name.value = "<?=isset($write['ca_name'])?$write['ca_name']:'';?>";
}
}
function html_auto_br(obj)
{
if (obj.checked) {