This project is not covered by Drupal’s security advisory policy.
CKE Placeholder is a plugin module that allows for easy addition of widgets to insert in CKEditor enabled long text fields in a way that is intuitive to the editor and easily themeable for the developer. The elements are inserted as CKEditor widgets that does not interfere with the rest of the content. It is saved as an HTML comment, so in case the module is disabled, the content will just not show up.
Quick presentation: https://vimeo.com/164619178
The module provides a floating library that is displayed in the right side of the form, a meta text filter that renders the inserted widgets and a theming function to render the draggable elements in the library.
Two kinds of hooks are available. One to define library panes and one to define how editor objects are displayed for the admin- and end user. Editable fields for the editor objects can be defined in the hook, but may need styling.
The module in itself does really not do anything until one of the sub modules are activated or a hook is written that utilizes the API.
The included submodule CKE Placeholder File Entities provides an example integration that renders a list of file entities and a search form. This is most likely too simple for most users, but all parts of it can be overridden using the alter hooks.
Example integrations that we have made (but are not yet ready for contrib):
- Social Media/Oembed (embed YouTube, tweets, Instagram, Facebook posts Google maps by pasting a URL)
- Kaltura - paste an ID and drag the video in place
- HTML Tables - provide a way to insert table data that cannot be used for layouts
- Twitter search pane - enter a tag or an id to get a list of tweets that can be dragged into the editor
Included is also the drop target module that provides a filefield widget replacement compatible with the editor.
Requirements
The module requires the CKEditor module with CKEditor 4.5.x. It was originally made for v4.4 but in v4.5 the drop event fires a paste event which makes handling of the inserted elements a lot smoother. The CKEditor plugins Widget and lineutils are required.
To keep your placeholders after HTML filter cleanup, you need to add comments as allowed tags ( <!--> ).
Drupal 8
We have not yet started, but expect to provide a Drupal 8 version.
Known problems
Like many other modules. CKE Placeholder has grown out of a highly customized solution, so there are some edges that needs to be polished and the documentation needs to be improved.
Credits
The module is obviously inspired by Scald. Thanks to Frakke for a lot of feedback during development.
Project information
Seeking co-maintainer(s)
Maintainers are looking for help reviewing issues.- Project categories: Content editing experience, Content display
- Created by kristougher on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.



