sitelink1  
sitelink2  
sitelink3  
sitelink4 http://1 
extra_vars4 ko 
extra_vars5 http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html 
extra_vars6 sitelink1 
?

// The instanceReady event is fired, when an instance of CKEditor has finished
// its initialization.
CKEDITOR.on( 'instanceReady', function( ev )
{
 // Show the editor name and description in the browser status bar.
 document.getElementById( 'eMessage' ).innerHTML = '<p>Instance <code>' + ev.editor.name + '</code> loaded.</p>';

 // Show this sample buttons.
  document.getElementById( 'eButtons' ).style.display = 'block';
});

 

function InsertHTML()
{
 // Get the editor instance that we want to interact with.
 var oEditor = CKEDITOR.instances.editor1;
 var value = document.getElementById( 'htmlArea' ).value;

 // Check the active editing mode.
 if ( oEditor.mode == 'wysiwyg' )
 {
  // Insert HTML code.
  // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#insertHtml
  oEditor.insertHtml( value );
 }
 else
  alert( 'You must be in WYSIWYG mode!' );
}

 

function InsertText()
{
 // Get the editor instance that we want to interact with.
 var oEditor = CKEDITOR.instances.editor1;
 var value = document.getElementById( 'txtArea' ).value;

 // Check the active editing mode.
 if ( oEditor.mode == 'wysiwyg' )
 {
  // Insert as plain text.
  // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#insertText
  oEditor.insertText( value );
 }
 else
  alert( 'You must be in WYSIWYG mode!' );
}

 

function SetContents()
{
 // Get the editor instance that we want to interact with.
 var oEditor = CKEDITOR.instances.editor1;
 var value = document.getElementById( 'htmlArea' ).value;

 // Set editor contents (replace current contents).
 // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#setData
 oEditor.setData( value );
}

 

function GetContents()
{
 // Get the editor instance that you want to interact with.
 var oEditor = CKEDITOR.instances.editor1;

 // Get editor contents
 // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#getData
 alert( oEditor.getData() );
}

 

function ExecuteCommand( commandName )
{
 // Get the editor instance that we want to interact with.
 var oEditor = CKEDITOR.instances.editor1;

 // Check the active editing mode.
 if ( oEditor.mode == 'wysiwyg' )
 {
  // Execute the command.
  // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#execCommand
  oEditor.execCommand( commandName );
 }
 else
  alert( 'You must be in WYSIWYG mode!' );
}

 

function CheckDirty()
{
 // Get the editor instance that we want to interact with.
 var oEditor = CKEDITOR.instances.editor1;
 // Checks whether the current editor contents present changes when compared
 // to the contents loaded into the editor at startup
 // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#checkDirty
 alert( oEditor.checkDirty() );
}

 

function ResetDirty()
{
 // Get the editor instance that we want to interact with.
 var oEditor = CKEDITOR.instances.editor1;
 // Resets the "dirty state" of the editor (see CheckDirty())
 // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#resetDirty
 oEditor.resetDirty();
 alert( 'The "IsDirty" status has been reset' );
}

번호 제목 글쓴이 날짜 조회 수
186 (Bard) FileReader 로 여러개의 파일을 read 하는 법 file 황제낙엽 2023.08.23 666
185 브라우저에서 뒤로 가기 막기와 펑션키(function key) 막기 황제낙엽 2005.10.21 665
184 두 서버의 자원을 접근하는 클라이언트 프레임웍(Next.js)에서의 CORS오류 file 황제낙엽 2021.12.05 663
183 XMLHttpRequest.timeout 황제낙엽 2018.11.03 663
182 javascript array contains method 황제낙엽 2011.08.19 657
181 Understanding User-Agent Strings 황제낙엽 2011.02.22 652
180 문자열에서 역슬래시(backslash) 문자와 유니코드(Unicode)에 대한 고찰 file 황제낙엽 2021.06.03 648
179 CryptoJS 를 이용한 암호화 황제낙엽 2023.02.15 647
178 [JavaScript Tutorials] JavaScript and memory leaks (해석중) 황제낙엽 2009.04.08 646
177 Fetch API (CORS 극복을 위한 노력) 황제낙엽 2021.12.05 642
176 UTF-8 한글 초성 추출 (자바스크립트) 황제낙엽 2019.05.07 641
175 브라우저의 스크롤을 따라다니는 레이어 두번째 file 황제낙엽 2002.12.20 641
174 자바스크립트 학습용 유튜브 강의 (드림코딩 by 엘리) 황제낙엽 2021.03.07 639
» CKEditor 3 JavaScript API Documentation 황제낙엽 2011.11.14 636
172 소스 보기 막기 황제낙엽 2005.11.18 634
171 Page Refresh/Reload 황제낙엽 2007.08.24 632
170 IE브라우저에서 서버의 XML파일을 ajax로 가져와 DOM파싱하는 예제 (XMLHttpRequest, XML, ActiveXObject) 황제낙엽 2018.11.23 627
169 자바스크립트 내장 함수 활용하기 황제낙엽 2005.04.25 625
168 Jasmine 테스트 및 CI 구축 가이드 황제낙엽 2016.11.16 624
167 CORS 의 내용과 이에 대한 우회 방안들 file 황제낙엽 2021.12.05 622