Using HTML/JS embed in tinymce on individual pages

InstantCMS 2.X
#1 5 августа 2025 в 02:56

I apologize for this being only in English as I do not understand Russian.  I want to embed js or html code to display an events calendar from an external provider as my I want to show dates that my band is playing shows and we use a site to handle our booking and promoting of shows.  They provide javascript or html code to be pasted into an html document to embed their calendar on the page.

InstantCMS has their TinyMCE set up to not allow code-level editing.  Pasting the JS or html code to show the calendar does not work as html tags are altered so the resulting page after submitting the form will just show the code on the page.  Some CMS's will allow the code-level option in the editor and I could embed code in the page.

Is there a way to do this with InstantCMS?   I looked at the wysiwyg class and options PHP files but it is difficult to figure out how to edit it to turn on code-level editing in TinyCME.  I know that this is generally done for safety.  However, I would turn this option on to create the few pages that I need to embed code and then I would replace the wysiwyg PHP files with the original to no longer allow code-level editing.  Or if there is another way to allow it I would be grateful for the advice. Thank you! 

#2 5 августа 2025 в 04:36

Anything is possible(probably). Have to add allowed tags in tinyMCE, than add them in typograph and so on. I will take a look at it tomorrow, if no one else reply's.

#3 5 августа 2025 в 05:42

If I understand correctly, you want to change the source code of the text you are adding in the editor? To do this, you first need to enable the «Source Code» button in the editor, the screenshot below shows how to do this.

Изображение

Then a button will appear in the editor where you can add HTML tags.

Изображение

#4 5 августа 2025 в 13:11

Weekendrockstar, the easiest way to solve this is to place an “HTML block” widget on the page you need.

Изображение  Изображение

#5 6 августа 2025 в 00:36

Weekendrockstar, 

Basically, what My-InstantCMS.Ru saidwill work for you.

#6 7 августа 2025 в 03:48

В некоторых случаях, достаточно использовать поле в настройках типов контента для записи вот так

Изображение
Вы не можете отвечать в этой теме.
Войдите или зарегистрируйтесь, чтобы писать на форуме.

Похожее в блогах

🍪Мы используем файлы cookie для работы сайта. Читать подробнее.