Title: yakyak's Replies | WordPress.org

---

# yakyak

  [  ](https://wordpress.org/support/users/yakyak/)

 *   [Profile](https://wordpress.org/support/users/yakyak/)
 *   [Topics Started](https://wordpress.org/support/users/yakyak/topics/)
 *   [Replies Created](https://wordpress.org/support/users/yakyak/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/yakyak/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/yakyak/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/yakyak/engagements/)
 *   [Favorites](https://wordpress.org/support/users/yakyak/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Raptor Editor] Limiting Editable areas](https://wordpress.org/support/topic/limiting-editable-areas/)
 *  [yakyak](https://wordpress.org/support/users/yakyak/)
 * (@yakyak)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/limiting-editable-areas/#post-4563993)
 * I’m trying a similar thing myself.
    You can put tags around the content you want
   editable in a page i.e. `<div class="raptor-editable-area">`
 * then if you edit the encloseEditablePosts function in Raptor.php in the plugin
   folder you can replace those tags with ones for enabling raptor on that area.
 *     ```
       public function encloseEditablePosts($content) {
               global $post;
   
               if(current_user_can('edit_post', $post->ID)) {
   
                   $replace = "<div class='raptor-editable-post' data-post_id='{$post->ID}'>";
                   $content =  str_replace('<div class="raptor-editable-area">', $replace, $content);
               }
   
               return $content;
           }
       ```
   
 * Then if you change the raptor-in-place-init.js in the javascript folder so that
   it goes through a loop of those areas rather than applying it to the whole doc…(
   just needs the top few lines adjusting)
 *     ```
       raptor(function($) {
           var textareas = $('.raptor-editable-post');
           if (!textareas.length) return;
   
           textareas.each(function() {
           //if (!$('.raptor-editable-post').length) return;
           $('.raptor-editable-post').editor({
       ```
   
 * don’t forget to close off the loop with a new
    `});`
 * at the bottom.
 * I’ve now got editable areas in a post!. A touch hacky but seems to work. Any 
   obvious probs, post them here – I’m still in my infancy with wordpress so I don’t
   know if I’m doing something terribly dodgy, but I can’t see a prob with it myself.

Viewing 1 replies (of 1 total)