FCKEDITOR 의 고급 기능 과 흔 한 문제 해결 방법
// HTML
function getEditorHTMLContents(EditorName) {
var oEditor = FCKeditorAPI.GetInstance(EditorName);
return(oEditor.GetXHTML(true));
}
//
function getEditorTextContents(EditorName) {
var oEditor = FCKeditorAPI.GetInstance(EditorName);
return(oEditor.EditorDocument.body.innerText);
}
//
function SetEditorContents(EditorName, ContentStr) {
var oEditor = FCKeditorAPI.GetInstance(EditorName) ;
oEditor.SetHTML(ContentStr) ;
}
FCK 의 이벤트 처리 FCK 는 OnComplete,OnBlur,OnFocus 등 이 벤트 를 정의 하여 이벤트 의 처리 함 수 를 사용 하여 해당 하 는 처 리 를 완성 할 수 있다.FCK 에 이벤트 처리 함 수 를 추가 하 는 방법 은 fckInstance.Events.AttachEvent(EventName,function)코드
//FCKeditor
function FCKeditor_OnComplete( editorInstance )
{
editorInstance.Events.AttachEvent( 'OnBlur' , FCKeditor_OnBlur ) ;
editorInstance.Events.AttachEvent( 'OnFocus', FCKeditor_OnFocus ) ;
}
function FCKeditor_OnBlur( editorInstance )
{
//
editorInstance.ToolbarSet.Collapse() ;
}
function FCKeditor_OnFocus( editorInstance )
{
editorInstance.ToolbarSet.Expand() ;
}
입 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
FCKEDITOR 관련 함수 소개FCK 의 인 스 턴 스 를 가 져 오 는 FCKeditorAPI 는 FCKeditor 를 불 러 온 후 등 록 된 전역 대상 입 니 다.이 를 이용 하면 편집기 에 대한 다양한 작업 을 수행 할 수 있 습 니 다....
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.