Skip Navigation

[Resolved] How do I insert into Text Editor?

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 6 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#614062

Tell us what you are trying to do?
Insert this code for a back-button;

<script>// <![CDATA[
function goBack() { window.history.back() }
// ]]></script>
<button onclick="goBack()">Go Back</button>

After inserting that and pressing save the Text Editor changes it to this;
<button onclick="goBack()">Go Back</button>

Is there any documentation that you are following?
Did a search, could not find any relevant documentation

Is there a similar example that we can see?
hidden link

#614573

Hi,

I assume you are going to add those JS codes + HTML codes into a visual editor cell of Layouts,
if it is, please edit the "visual editor cell", switch to HTML tab, then you will be able to insert those codes you mentioned above, see screenshot visual-editor-cell.JPG

If it is other cases, I suggest you put the JS codes into Dashboard-> Toolset-> Layouts CSS and JS Editor-> JS Editor:

function goBack() { window.history.back() }

And display the button in Text Editor with only HTML codes:

<button onclick="goBack()">Go Back</button>

The forum ‘Types Community Support’ is closed to new topics and replies.