NickC
NickC

Reputation: 1353

CKEditor editable content in IFrame

Is it possible to run ckeditor on an IFrame so that can encapsulate a full html page? I have tried various methods but nothing seems to work.

What I am looking for is to have a ckeditor wrapper page say Editor.htm which contains an editable IFrame linked to my real html page say test.htm. Something line:

Editor.htm

<!DOCTYPE html>
<html>
  <head>
    <script src="http://cdn.ckeditor.com/4.5.10/standard-all/ckeditor.js"></script>
  </head>
  <body>
    <iframe contenteditable="true" src="test.htm" id="editor1" name="editor1"></iframe>
  </body>
</html>

Upvotes: 0

Views: 429

Answers (1)

Atzmon
Atzmon

Reputation: 1318

You can set ckeditor to use "fullPage" mode, allowing you to edit everything from the opening tag to the closing tag. See the official sample here.

You will still need to get the content into the editor (e.g. the html page you want to edit) and save the result on the server, but this is something specific to your site, language, platform etc.

Upvotes: 2

Related Questions