[wp-trac] [WordPress Trac] #27386: Editor: Word count should exclude shortcodes

WordPress Trac noreply at wordpress.org
Wed Mar 12 23:41:15 UTC 2014


#27386: Editor: Word count should exclude shortcodes
--------------------------+-----------------------------
 Reporter:  bassgang      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  javascript    |
--------------------------+-----------------------------
 On the post edit screen the Word count includes shortcodes, but they
 should not be considered as normal words and so not increase the count.

 Steps to reproduce:

 * Add a new post.
 * Add a gallery to the newly created post.
 * Save the post.
 * Reload the page.
 * Check "Word count" under the content textarea, it says "2".

 [[Image(word_count_shortcodes.png)]]

 As pointed out by azaozz: "to make that work properly we need to output an
 array of shortcode "names", then exclude them in the word count".

 Who can provide guidance to show which is the most likely way to get this
 information available in JS?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27386>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list