<![CDATA[ [TIP] Enabling HTML5 elements in TinyMCE - MODX Community Forums]]> https://forums.modx.com/thread/?thread=70203 <![CDATA[Re: [TIP] Enabling HTML5 elements in TinyMCE]]> https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce?page=2#dis-post-558810 Quote from: christianhanvey at Sep 12, 2011, 07:43 PM



Locate the config file for TinyMCE, and update the mce_extended_valid_elements variable to include the elements you need.
The config file is located:
In Evo: 'assets/plugins/tinymce/js/xconfig.js'
In Revo: 'assets/components/tinymce/xconfig.js'

var mce_extended_valid_elements = "figure[class],figcaption";



Hi, i added figure and figcaption, as stated in your comment, but as soon as i refresh the modx editor page, it deletes those tags. but in my html site, figure and figcaption are correct. using revo 2.5.6 and tinymce 4.3.3]]>
jacielluve May 29, 2018, 03:50 PM https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce?page=2#dis-post-558810
<![CDATA[Re: [TIP] Enabling HTML5 elements in TinyMCE]]> https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce?page=2#dis-post-443199
var mce_extended_valid_elements = "-article"
in my Evo: 'assets/plugins/tinymce/js/xconfig.js, so it stopped deleting the article tag. But tinyMCE then includes it in a <p> tag. Furthermore, it adds a new one any time I open its html editor, like this:
<p> </p>
<p> </p>
<p><article>
article test</article></p>

I think I have to tell to tinyMCE that article is a block element, like div, but I don't know how.
Any help?
Mine is the TinyMCE version: 3.3.9.2 (2010-09-29) on MODx Evo 1.0.6]]>
andrearicci Nov 14, 2012, 10:35 AM https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce?page=2#dis-post-443199
<![CDATA[Re: [TIP] Enabling HTML5 elements in TinyMCE]]> https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce?page=2#dis-post-439077
First excuse my English, french is my first language.

I tried both solutions and none works correctly.

1) var mce_extended_valid_elements = "figure [class], figcaption";
no html5 tags in the format list and when I code html5 tags in the html mode and return to tinyMce mode all html5 tags are replace by a <p> tags;

2) Tiny.config.valid_elements = "* (*)";
no html5 tags in the format list and when I code html5 tags in the html mode and return to tinyMce mode all html5 stil there, but the only way to change any tag, is to go back to the html mode.

More Modx sites are designed with html 5 and content publishers need to be able to use html tags 5. Does anyone found a solution to this problem?

Thank you for your cooperation

Modx 2.2.5
TinyMCE 4.3.3
PHP : 5.2.13
MySQl : 5.1.44
MAMP PRO]]>
jber Oct 04, 2012, 04:00 PM https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce?page=2#dis-post-439077
<![CDATA[Re: [TIP] Enabling HTML5 elements in TinyMCE]]> https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-435180 In my case I add'd this code
1

Tiny.config.valid_elements = "*(*)";
Hi,

Tried this.. still nothing. as soon as I click on INSERT there's no more my code into the rte (only a surrounding div if my custom tpl had one, but everything inside it had been removed).

Really, does any of the modx guru can find something please?

thank you]]>
elz064 Aug 30, 2012, 03:53 AM https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-435180
<![CDATA[Re: [TIP] Enabling HTML5 elements in TinyMCE]]> https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-435153 frogabog Aug 30, 2012, 01:07 AM https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-435153 <![CDATA[Re: [TIP] Enabling HTML5 elements in TinyMCE]]> https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-435127


------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone: http://bobsguides.com/modx.html]]>
BobRay Aug 29, 2012, 06:34 PM https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-435127
<![CDATA[Re: [TIP] Enabling HTML5 elements in TinyMCE]]> https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-435059
1. Open: core/components/tinymce/templates/script.tpl
2. Add your code after this:
Tiny.config = <?php echo $this->modx->toJSON($this->properties); ?>;


In my case I add'd this code
Tiny.config.valid_elements = "*(*)";


I can't use the bracket in my code so replace ( with []]>
DragoslaV Aug 29, 2012, 04:14 AM https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-435059
<![CDATA[Re: [TIP] Enabling HTML5 elements in TinyMCE]]> https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-423023 However, with revo 2.22 and last Tiny I can actually see figureand figcaption are already included into the valid elements list.

But I just can add them to the select list to make them pickable in the select.
Same issue for strong tag which is now included into the valid list but no way to make it appears in the select .

I'm doing it by adding those tag in the tiny.theme_advanced_blockformats (system param) list.
This only add new blank lines into the select, but strictly nothing else.

How do you manage ??
Thank you]]>
elz064 May 10, 2012, 02:31 AM https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-423023
<![CDATA[Re: [TIP] Enabling HTML5 elements in TinyMCE]]> https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-422999 which version of MODX are you using? And you have definitely installed TinyMCE?
I have a fresh install of v2.2.2 and Tinymce4.3.2 and the config file is definitely at:
'assets/components/tinymce/xconfig.js'

(I also notice that many HTML5 elements have now been added by default)]]>
christianhanvey May 09, 2012, 05:30 PM https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-422999
<![CDATA[Re: [TIP] Enabling HTML5 elements in TinyMCE]]> https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-422936
I'm not able to locate the config file you're talking about.
It's now Tiny 4.32

Thanks]]>
elz064 May 09, 2012, 07:54 AM https://forums.modx.com/thread/70203/tip-using-html5-elements-in-tinymce#dis-post-422936