Skip to:
Content
Pages
Categories
Search
Top
Bottom

A text editor for messages !

  • Profile photo of gvaslin
    gvaslin
    Participant

    @gvaslin

    Hello,

    Does anybody know if there’s a plugin or something to do to get a rich text editor when we write a private message with the buddypress extension ?
    Many thanks for your answer,

    Guillaume

Viewing 4 replies - 1 through 4 (of 4 total)
  • Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    You could probably use the inbuilt WordPress editor wp_editor() with the message textarea. See here for more info: https://codex.wordpress.org/Function_Reference/wp_editor

    Profile photo of Renato Alves
    Renato Alves
    Participant

    @espellcaste

    @henrywright One question as this topic interests me a lot.

    To make it work, I should replace the html form tags in the bp-legacy/members/single/messages/compose.php with this function or am I missing something here?

    If possible, could you put an example, with code?

    Thanks in advance!

    Profile photo of gvaslin
    gvaslin
    Participant

    @gvaslin

    Sorry to be so… newbie but could you be more precise on the way to do it ? Please.

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Hi @espellcaste

    Try adding this to compose.php right under the private message <textarea></textarea>

    wp_editor( '', 'content' );

    I do believe that should be enough to get the basic editor working for private messages on the compose screen.

    Note 1: Untested

    Note 2: You can also pass an array of arguments in the form of $settings. This is optional. It will let you do slightly more advanced stuff like load TinyMCE or quicktags. See the Codex link above for more info.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘A text editor for messages !’ is closed to new replies.