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?
[ed. note: lucy last edited this post 4 years, 10 months ago.]
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.
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:
I'm glad that worked. I wasn't sure it would.
Thanks for the kind words and the plug.
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.
And again, for anyone reading this who has also suffered from tinyMCE, you can get Redactor here, install it, and never look back!
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.
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).
Here's another thought. Remove all the Context Settings and put this in the NewsPublisher snippet tag:
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.
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,'');
$whichEditor = $this->modx->getOption('which_editor',$this->props,'');
That should make the property work.