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' );
}

번호 제목 글쓴이 날짜 조회 수
146 외부 라이브러리 (.js) 의 바람직하지 않은 동적 로딩 (eval함수 이용) 황제낙엽 2012.01.18 2134
145 IFrames and cross-domain security file 황제낙엽 2012.01.13 533
144 자바스크립트 숫자형 체크 함수 (isFinite() 함수 와 isNaN() 함수) 황제낙엽 2011.12.13 441
143 char to hex string 황제낙엽 2011.11.29 549
142 Understanding delete 황제낙엽 2011.11.28 417
141 JScript Memory Leaks 황제낙엽 2011.11.28 586
140 JavaScript Reserved Words 황제낙엽 2011.11.28 817
139 Reference Count (순환참조) 황제낙엽 2011.11.24 501
138 IE and Memory accumulation in Javascript (document.createElement()) file 황제낙엽 2011.11.24 1541
137 String Performance: Getting Good Performance from Internet Explorer (IE7) 황제낙엽 2011.11.24 655
136 Memory leak 및 성능 측정 도구 file 황제낙엽 2011.11.23 913
135 JavaScript Array.push Performance 황제낙엽 2011.11.21 660
» CKEditor 3 JavaScript API Documentation 황제낙엽 2011.11.14 456
133 다양한 WYSIWYG 에디터 황제낙엽 2011.11.13 361
132 Faster JavaScript Memoization For Improved Application Performance 황제낙엽 2011.11.04 644
131 Top 10 JavaScript Performance Tips+Android & iPhone Engine Testing 황제낙엽 2011.11.04 367
130 url encode & decode 황제낙엽 2011.10.30 759
129 페이지 스크롤 끝 확인 황제낙엽 2011.10.24 6785
128 call() and apply() methods in Javascript 황제낙엽 2011.10.07 643
127 Function.apply and Function.call in JavaScript 황제낙엽 2011.10.07 554