Hi guys
I already ask this question servel time but never got an answer.
This is very basic so it kind of surprise that know one know the answer.
How on earth do I call existing page to the editor?
Lets say I have a html page -"somepage.html" and I want to load this page into the editor,what is the command for doing this(I don't care what script language just give me something).
What is the command for saving this page after the editing?
Any help will be appreciated
Thanks
Baaroz
Fri, 06/10/2011 - 11:37
#1
Re: load pages into the editor
Namespace CKEDITOR.ajax
Defined in: plugins/ajax/plugin.js.
Method Summary Method Attributes Method Name and Description
<static> CKEDITOR.ajax.load(url, callback)
Loads data from an URL as plain text.
<static> CKEDITOR.ajax.loadXml(url, callback)
Loads data from an URL as XML.
Method Detail
<static> {String} CKEDITOR.ajax.load(url, callback) Since: 3.0 Loads data from an URL as plain text.
// Load data synchronously.
var data = CKEDITOR.ajax.load( 'somedata.txt' );
alert( data );// Load data asynchronously.
var data = CKEDITOR.ajax.load( 'somedata.txt', function( data )
{
alert( data );
} );Parameters:
{String} url
The URL from which load data.
{Function} callback Optional
A callback function to be called on data load. If not provided, the data will be loaded synchronously.
Returns:
{String} The loaded data. For asynchronous requests, an empty string. For invalid requests, null.
--------------------------------------------------------------------------------
<static> {CKEDITOR.xml} CKEDITOR.ajax.loadXml(url, callback) Since: 3.0 Loads data from an URL as XML.
// Load XML synchronously.
var xml = CKEDITOR.ajax.loadXml( 'somedata.xml' );
alert( xml.getInnerXml( '//' ) );// Load XML asynchronously.
var data = CKEDITOR.ajax.loadXml( 'somedata.xml', function( xml )
{
alert( xml.getInnerXml( '//' ) );
} );Parameters:
{String} url
The URL from which load data.
{Function} callback Optional
A callback function to be called on data load. If not provided, the data will be loaded synchronously.
Returns:
{CKEDITOR.xml} An XML object holding the loaded data. For asynchronous requests, an empty string. For invalid requests, null.
this may can help you
呵呵