X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_samples%2Fplaceholder.html;h=e8055ee14227cd326c15fa5580c1c70d1f626397;hp=8d04af3779ecd121141b34df2d9371d1f967a137;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hpb=9afde8772159bd3436f1f5b7862960307710ae5a diff --git a/_samples/placeholder.html b/_samples/placeholder.html index 8d04af3..e8055ee 100644 --- a/_samples/placeholder.html +++ b/_samples/placeholder.html @@ -1,20 +1,42 @@ - Placeholder Plugin - CKEditor Sample + Placeholder Plugin — CKEditor Sample -

- CKEditor Sample +

+ CKEditor Sample — Using the Placeholder Plugin

+
+

+ This sample shows how to configure CKEditor instances to use the + placeholder plugin that lets you insert read-only elements + into your content. To enter and modify read-only text, use the + Create Placeholder button and its matching dialog window. +

+

+ To add a CKEditor instance that uses the placeholder plugin and a related + Create Placeholder toolbar button, insert the following JavaScript + call to your code: +

+
CKEDITOR.replace( 'textarea_id',
+	{
+		extraPlugins : 'placeholder',
+		toolbar : [ [ 'Source', 'Bold' ], ['CreatePlaceholder'] ]
+	});
+

+ Note that textarea_id in the code above is the id attribute of + the <textarea> element to be replaced with CKEditor. +

+

- In this sample the Placeholder plugin is available.
- It replaces text in the format of [[text]] to uneditable sections, and lets the user edit them and create new ones using a dialog.

-


+ CKEditor using the placeholder plugin with its default configuration: