Damian Hetman
Damian Hetman

Reputation: 382

CKEditor is disabled - I've tried everything

I have problem with CKEditor. I download lastest version and implement on my CMS. All buttons and textarea are disabled and I can't do anything. I searched and find solutions like CKEditor.inline or readOnly but it just doesn't work... My code looks just like:

<!DOCTYPE HTML>
<html lang="pl">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Test</title>
  <script type="text/javascript" src="ckeditor/ckeditor.js"></script>
</head>

<body>

  <textarea name="editor" class="text" rows="4" cols="115">Some text</textarea>
  <script type="text/javascript">
    CKEDITOR.replace("editor");
  </script>

</body>

</html>

And here is live version: http://www.hbmedia.pl/test.php

Upvotes: 2

Views: 1287

Answers (2)

Yuri Tinyukov
Yuri Tinyukov

Reputation: 144

If you don't want to use iframe as a content container you might want to use Div editing area. The behaviour is described in IFrame Editing Area page in the notes section:

This is the core functionality of the classic, iframe-based editor which can only be disabled if it is backfilled by an alternative plugin (such as Div Editing Area) or if only inline editor is used.

Upvotes: 1

ShibbyUK
ShibbyUK

Reputation: 1521

I finally figured this one out. Thought I'd post an answer in case anybody else comes across this question.

In order for the "Classic Editor" to function within a custom ckeditor4 package, you need to make sure the "wysiwygarea" feature is added to the package. This is named "iFrame editing area" in the feature list.

If you don't do this, only the inline editor is available, even though the classic editor shows up as disabled.

Upvotes: 5

Related Questions