+ <meta name="ckeditor-sample-description" content="Editing HTML content of both inline and classic editor instances.">
+ <meta name="ckeditor-sample-isnew" content="1">
+ <style>
+
+ #editable
+ {
+ padding: 10px;
+ float: left;
+ }
+
+ </style>
+</head>
+<body>
+ <h1 class="samples">
+ <a href="../../../samples/old/index.html">CKEditor Samples</a> » Editing source code in a dialog
+ </h1>
+ <div class="warning deprecated">
+ This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/sourcearea.html">brand new version in CKEditor SDK</a>.
+ </div>
+ <div class="description">
+ <p>
+ <strong>Sourcedialog</strong> plugin provides an easy way to edit raw HTML content
+ of an editor, similarly to what is possible with <strong>Sourcearea</strong>
+ plugin for classic (<code>iframe</code>-based) instances but using dialogs. Thanks to that, it's also possible
+ to manipulate raw content of inline editor instances.
+ </p>
+ <p>
+ This plugin extends the toolbar with a button,
+ which opens a dialog window with a source code editor. It works with both classic
+ and inline instances. To enable this
+ plugin, basically add <code>extraPlugins: 'sourcedialog'</code> to editor's
+ config:
+ </p>
+<pre class="samples">
+// Inline editor.
+CKEDITOR.inline( 'editable', {
+ <strong>extraPlugins: 'sourcedialog'</strong>
+});
+
+// Classic (iframe-based) editor.
+CKEDITOR.replace( 'textarea_id', {
+ <strong>extraPlugins: 'sourcedialog'</strong>,
+ removePlugins: 'sourcearea'
+});
+</pre>
+ <p>
+ Note that you may want to include <code>removePlugins: 'sourcearea'</code>
+ in your config when using <strong>Sourcedialog</strong> in classic editor instances.
+ This prevents feature redundancy.
+ </p>
+ <p>
+ Note that <code>editable</code> in the code above is the <code>id</code>
+ attribute of the <code><div></code> element to be converted into an inline instance.
+ </p>
+ <p>
+ Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
+ the <code><textarea></code> element to be replaced with CKEditor.