Ticket #2047 (closed enhancement: fixed)

Opened 6 years ago

Last modified 6 years ago

wp_richedit_pre() may better have a filter hook for customization & i18n

Reported by: mani_monaj Owned by: ryan
Priority: high Milestone:
Component: General Version: 2.0
Severity: normal Keywords: richedit_pre tinymce bg|has-patch
Cc:

Description

For some i18n purposes, We need to take control of the default text shows up in TinyMCE when a blank post/page starts, wp_richedit_pre() is called before TinyMCE wants to show content for some filterings, It also checks if it's a blank post or not, I added an filter hook to this function named "richedit_pre"

Attachments

functions-formatting.php.diff Download (616 bytes) - added by mani_monaj 6 years ago.
imhungry.diff Download (707 bytes) - added by skeltoac 6 years ago.

Change History

  • Keywords richedit_pre bg|has-patch added; richedit_pre, default text removed
  • Owner changed from anonymous to ryan

Good idea! I've modified it a bit to remove the empty paragraph as default. It was only added to improve RTL support but it hurts the experience for LTR users. Now anyone writing a plugin to turn on RTL is burdened with adding '<p> </p>' to any empty string.

comment:2   ryan6 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [3284]) Add richedit_pre filter. Props mani_monaj. fixes #2047

Note: See TracTickets for help on using tickets.