MODX Community

TinyMCE RTE added RichText fields in the manager for 'Description' and 'Summary (introtext)' - how can I revert them back to plain Text?

Revolution 2.7.1-pl
Localhost: MAMP 5.4
Mysql: 5.7.26 - utf8
PHP: 7.3.7
Mac: Mojave

Hello,
I’ve installed TinyMCE RTE on a localhost build and in the Manager it appears to have automatically converted the Description and Summary (introtext) fields from plain Text into Rich Text.

I use the Description and Summary (introtext) fields for <meta> data and I don’t want the <p> tags added by the Rich Text fields.

Can somebody advise on how to revert only the Description and Summary fields back to plain Text inputs in the Manager.

This is prob fairly straight-forward (e.g. assigning a TV type) and I would like to get under the skin of the manager but currently it’s a bit needle/haystack for me :eyes:

Many thanks in advance!

1 Like

Please delete this post, total error

Thanks for the reply.

A main reason I use Tiny is great configuration, and specifically the ability to config image ’Caption’ which wraps images inside HTML5 <figure> <figcaption>.

I know this issue sounds weird/not possible but check this screengrab of the issue showing a typical resource and see the RTE fields for Description and Summary(introtext). I have also had the same issue with TinymceWrapper.

Before I installed TinyMCE RTE these were standard Text inputs (like Title / Long Title) which is what I need:

@nuann88 if you or anyone else can advise any other RTE with <figure> <figcaption> as a feature I’ll happily jump ship. However, at this point don’t have too much time luxury to experiment with the multitude of other RTE’s available.

Many thanks.

1 Like

Hi I am looking into this, do you have version 2.2, released just in June this year, installed?

Hi there,

Nope, it’s TinyMCE Rich Text Editor 1.3.2-pl. That’s what came down the pipes automatically in Package Mgmgt on 2019-08-10 so it’s a recent build but won’t update, I have tried.

Seems odd I didn’t get the latest, 2.2 - see the screenie below for what’s installed. Just OOI, do I need to have TinyMCE vanilla version installed as well? Can’t imagine it but it’s worth a punt.

1 Like

Hold on I am wrong, its called TinyMCE 4 in the title but it is indeed version 1.3, I am sorry. Was late last night, ugg I was even wrong about the 2.2, that’s the minimum Revo version supported

Ok I don’t want to install it myself, could you check in system settings > TinyMCE in the Modx manager for any controls in there.

Let’s wait for more knowledgeable people to weigh in, I don’t want to steer you wrong. Weekends are usually light on viewings.

Also, pls check this page about applying TinyMCE to specific fields

https://docs.modx.com/extras/revo/tinymce/tinymce.template

This is just a quick guide for adding templates to TinyMCE in Revolution (I found this in the forums after searching for an hour, so I thought it might be worth putting it here).

  • In the manager, goto: System -> System settings .

  • Choose ’ TinyMCE ’ in the ‘core’ selection box and ’ General ’ in the ‘filter-by-area’ selection box.

  • Look for the property: ’ Custom Plugins ’ (key: ‘tiny.custom_plugins’). Add the value ’ template ’ at the end of the list that is already there.

  • Change the value for the property ’ Template List ’ (key: ‘tiny.template_list’). Add the values (templates) in a comma separated list in this format:

I think this ‘filter by area’ selection is what you need…and pls go through all those setting options, its probably in there, I think we are talking about the ‘fields’ that TinyMCE applies to

Hey no stress @nuan88 and thanks so-far! I’ll look over what you recommend here and see if it gets a result. Will write back after that, been kinda busy here also.

1 Like

It’s a bit catch-22 - that Extras page relates to old style vanilla TinyMCE, not what I’m using/want to use. Nonetheless just for experimentation I rolled back to that at version 4.3.4-pl and hey-presto it removes the original issue of Rich Text fields being added to Description and Summary(introtext).

But… then it doesn’t include the <figure> <figcaption> feature and I can’t find the option to add it in a config file or from within MODX settings. Believe me I’ve looked.

I got round that a couple of years ago by using TimeMCE Wrapper but instantly got the same issue of Rich Text fields being added to Description and Summary(introtext) … as mentioned in my 1st post here - so catch-22 :confused:

With TinyMCE RTE I found this post really helpful: community.modx.com/t/external-configuration-of-tinymce-rich-text-editor/
… which in turn lead me here: tiny.cloud/docs-4x/plugins/image/#image_caption - which gave me the config for <figure><figcaption> etc. which is cool - but also the unwanted RT fields. So it’s catch-22 again :frowning_face:

Obv I could get round all of this by creating a new TV as plain text and simply using that for my <meta> data. But that would be defeating the object and going completely against my mantra of MODX being super-flexible, easy to use, a superior SEO CMS (actually paraphrasing the MODX team) and blah!!!

So I should be able to use Description and Summary(introtext) for <meta> without TinyMCE RTE - my chosen RTE plugin hijacking those fields >>> please !!!

Confused yet? I am!!! Do I need to hack the actual manager templates to circumvent this whole shebang?

1 Like

Hi @nuan88 I’ve been unable to hit this for a few days now but I have had a tinker with what you suggested earlier re tiny.custom_plugins & tiny.template_list

Hadn’t done this before, was really straight forward to get rolling and it will come in very useful. I only did it with vanilla TinyMCE, not TinyMCE RTE - its different with RTE in the settings but I think it’ll be straight forward to replicate with a couple of new Settings.

Unfortunately it’s not touching my original issue wherein some manager field types have been changed by TinyMCE RTE. I’ve looked at all of the plugin settings and nothing appears relevant in there that I could edit.

Your suggestion:

I would assume that all resource fields are not compiled into some whole by the Modx manager. If this is true, then the routine of TinyMCE will apply to the fields the snippet defines. Haul out these fields and problem solved.

Outside of the plugin Settings where I’ve already looked, I don’t know how to go about doing this or where to find the culprits to haul out. Could you add a pointer?

Thanks thus far though :+1:

1 Like

Hmm, maybe we could roll back again to the vanilla TinyMCE and add in the <figure> <figcaption>

edit: oh wow maybe this is it, this post is old but that doesn’t likely matter, well let me give you what looks like a cleaner solution, but the old forum has some methods

http://blog.akinyeleolubodun.com/enabling-html5-elements-in-tinymce-for-modx.html

https://forums.modx.com/thread/70203/tip-enabling-html5-elements-in-tinymce

Rumbled it!

I uninstalled TinyMCE RTE and installed TinymceWrapper and without doing anything myself this just fixed the problem of rich text fields hijacking the plain text in the manager. Really strange thing is that I’ve had exactly the same text field issue from TinymceWrapper in a different build ages ago but that obv isn’t the case now.

TinymceWrapper has the image Caption feature already configured which applies <figure><figcaption> so there’s no need to write any further config file, as I did with Tiny-RTE. So for now all is fine!

Thanks for bearing with me on this, and I also got a bit of serendipity with tiny.template_list which is cool. Unfort the original issue of the fields being ‘hijacked’ is still a mystery but at least I know how to avoid it. I may have a tinker on another local build to see if the custom config had anything to do with it - will write if I discover that.

:+1:

1 Like

Wow great! Yes this has been an unusual situation, and while the pages I found were possibly related, they all had nothing to do with your problem haha.

Tinker tinker til things pay off, no?

Tinker yes most definitely - I’ll be doing that with TinymceWrapper just to get a better handle on some of its inner workings and how it hands over to TinyMCE. It’s all ‘fun’!

1 Like

Yeah I think that’s what I was mentioning before, you can look through the snippet to see how it handles things. Its not easy to know how to haul a piece out, but to some extent you can identify it

TinymceWrapper is a great extra; a very much improved way to use tinymce in MODX. Here’s a great plugin for it that Don Shakespeare posted a while back, for making custom buttons to add pieces of html or whatever:


And he posted a tutorial too (select text to see the button popup):

1 Like

@lucy thanks for the tip, will have a look at that, and handy that there’s a tut to accompany it.