# CKEditor Samples » Replace DIV with CKEditor on the Fly

This sample shows how to automatically replace `<div>` elements with a CKEditor instance on the fly, following user's doubleclick. The content that was previously placed inside the `<div>` element will now be moved into CKEditor editing area.

For details on how to create this setup check the source code of this sample page.

Double-click any of the following `<div>` elements to transform them into editor instances.

### Part 1

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.

### Part 2

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.

Donec velit. Mauris massa. Vestibulum non nulla. Nam suscipit arcu nec elit. Phasellus sollicitudin iaculis ante. Ut non mauris et sapien tincidunt adipiscing. Vestibulum vitae leo. Suspendisse nec mi tristique nulla laoreet vulputate.

### Part 3

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.