[wp-trac] [WordPress Trac] #30966: Let's make word count better (master ticket)
WordPress Trac
noreply at wordpress.org
Fri Jul 3 09:35:37 UTC 2015
#30966: Let's make word count better (master ticket)
--------------------------+-------------------------
Reporter: iseulde | Owner: iseulde
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.3
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript
--------------------------+-------------------------
Comment (by iseulde):
> Another "speed-up" thing to try is using editor.getBody().textContent
instead of editor.getContent{'raw'). That will give us only the text, with
tags and entities already removed. If that works well, we will need to
pass the context to the counting function as we will still need to strip
tags for the Text editor (the tag stripping regex needs to catch html
comments too).
Should we exclude `code` and `form`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30966#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list