Front-end Editor
Paragraph editing not working properly (+fix) (2 posts)

  1. Joost
    Posted 5 years ago #

    When using the plugin to edit specific paragraphs, it does not recognize paragraphs properly. This is due to the fact that the regex in the function split (fields/post.php, around line 143) does not take line-breaks into account. This is easily remedied by adding an "s" at the end of the expression. It makes sure that line breaks are also matched by the . (dot) operator.

    protected function split( $content, $autop = false ) {
    		if ( $autop )
    			$content = wpautop( $content );
    		preg_match_all( "#<p.*?>(.*?)</p>#s", $content, $matches );
    		return $matches[1];



  2. scribu
    Plugin Author

    Posted 5 years ago #

    Hi Joost,

    Thanks for providing a fix. However, in the development version (2.0-alpha2) I'm using PHP's DOM extension to parse paragraphs.

    Please try it out.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Front-end Editor
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic