diff --git collapse_text.module collapse_text.module
index 5b9cd8c..511c159 100755
--- collapse_text.module
+++ collapse_text.module
@@ -63,14 +63,18 @@ function collapse_text_process($text) {
   // Per #259535 and #233877, add ability to specify title
   // in collapse text. Thanks rivena, Justyn
   $text = preg_replace_callback('/
+      (<p>\s*\n*)?               # look for an (optional) opening paragraph (WYSIWYG editors)
       \[                         # look for an opening bracket
          collapse                # followed by the word `collapse`
          (\ collapsed)?          # followed by (optionally) a space and the word `collapsed` (captured)
          (?:\ title=([^\]]*))?   # followed by (optionally) a space and a title, consisting of any
                                  # characters except a close bracket (captured)
       \]                         # followed by a closing bracket
+      (<\/p>\s*\n*)?             # followed by an (optional) closing paragraph (WYSIWYG editors)
       (.+?)                      # then capture as few characters as possible until
+      (<p>\s*\n*)?               # followed by an (optional) opening paragraph (WYSIWYG editors)
       \[\/collapse\]             # a closing "tag", which is a slash followed by `collapse` in brackets
+      (<\/p>\s*\n*)?             # followed by an (optional) closing paragraph (WYSIWYG editors)
     /smx',
     "_collapse_text_replace_callback", $text);
   return $text;
@@ -79,9 +83,9 @@ function collapse_text_process($text) {
 function _collapse_text_replace_callback($matches) {
   // 2008-12-15 REMorse (no issue number) added space to make
   // $collapsed work
-  $collapsed = ($matches[1] == ' collapsed');
-  $title = trim($matches[2]);
-  $interior = $matches[3];
+  $collapsed = ($matches[2] == ' collapsed');
+  $title = trim($matches[3]);
+  $interior = $matches[5];
   
   if (empty($title)) {
     // If a title is not supplied, look for a header (<h1>, <h2> ...)
