We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37047 ☆ A M B ☆
    • 309 Posts
    I have installed NewsPublisher 1.4.2 and am not seeing a rich text editing box - only the default plain text editing box.. My call is:

    [[!NewsPublisher? &show=`content` &initrte=`1` &rtcontent=`1`]]


    The site uses Redactor for the RTE, although TinyMCE 4.3.3 is still installed. Could this be the issue, and if so, is there a way to change the RTE settings just for NewPublisher to TinyMCE?


    This question has been answered by BobRay. See the first response.

    [ed. note: lucy last edited this post 11 years ago.]
      Lucy Iannotti
      Following Sea design & development
      http://www.following-sea.com
      New Bedford, MA
      • 3749
      • 24,544 Posts
      TinyMCE is really the only editor that works with NewsPublisher in the front end.

      You might try creating a Context Setting for the 'web' context called which_editor and setting its value to TinyMCE.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 37047 ☆ A M B ☆
        • 309 Posts
        Perfect! Thank you so very much -- that did the trick.

        With gratitude for everything you do for this community I just bought the digital version of your excellent MODX book.

        I mention it here for anyone else who has been helped by this solution, you can buy BobRay's book here:
        http://bobsguides.com/modx-the-official-guide-digital-edition.html
        :)
          Lucy Iannotti
          Following Sea design & development
          http://www.following-sea.com
          New Bedford, MA
          • 3749
          • 24,544 Posts
          I'm glad that worked. I wasn't sure it would. wink

          Thanks for the kind words and the plug. smiley
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 37047 ☆ A M B ☆
            • 309 Posts
            Oh, and speaking of plugs, I have to say that Redactor is the only RTE I've ever worked with that doesn't make me cry and curse and tear my hair out. Would be awesome if it could be an option to use with NewsPublisher. laugh

            And again, for anyone reading this who has also suffered from tinyMCE, you can get Redactor here, install it, and never look back!
            https://www.modmore.com/extras/redactor/
              Lucy Iannotti
              Following Sea design & development
              http://www.following-sea.com
              New Bedford, MA
              • 37047 ☆ A M B ☆
              • 309 Posts
              Oops - I guess I was hasty in my assessment. Unfortunately that "web" context setting changed the RTE for the manager too. Not right away, but after a log out and back in -- now tinyMCE is the RTE for everything even though the which_editor setting in system settings still says Redactor.

              I tried making a context setting for the "mgr" context with a value of Redactor, but it does not have any effect. sad

              Darn.
                Lucy Iannotti
                Following Sea design & development
                http://www.following-sea.com
                New Bedford, MA
                • 3749
                • 24,544 Posts
                That's what I was afraid of. I consider that pretty close to being a bug. When you're in the Manager, you're in the 'mgr' Context and 'web' context Context Settings shouldn't apply.

                Does it affect elements? Looking at the code, I'd expect it to only affect resources (since elements don't have a context_key).
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 3749
                  • 24,544 Posts
                  Here's another thought. Remove all the Context Settings and put this in the NewsPublisher snippet tag:

                  &which_editor=`TinyMCE`


                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 37047 ☆ A M B ☆
                    • 309 Posts
                    Does seem like a bug, doesn't it? Should I file it as such?

                    By "affect elements" do you mean rich text TVs? Because yes, those get switched from Redactor to TinyMCE also when the "web" Context Setting is set to TinyMCE.

                    I tried the snippet property you suggested but unfortunately that did nothing. sad
                      Lucy Iannotti
                      Following Sea design & development
                      http://www.following-sea.com
                      New Bedford, MA
                    • discuss.answer
                      • 3749
                      • 24,544 Posts
                      I see why.

                      Change line 394 of the newspublisher class file (core\components\newspublisher\model\newspublisher\newspublisher.class.php) from

                      $whichEditor = $this->modx->getOption('which_editor',null,'');


                      to

                      $whichEditor = $this->modx->getOption('which_editor',$this->props,'');


                      That should make the property work.
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting