You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#116953 JCE (and TinyMCE) strip RSForm code from HTML

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Friday, 22 November 2024 16:58 GMT

Thomsterdam

Hi there,

This question has been asked before: https://www.joomlacontenteditor.net/support/forum/editor/110661-code-getting-stripped-from-rsform-admin-email-template but the solution you suggested does not exist anymore. So here goes: 

 

I am using RS Form Pro on my site. The e-mail templates for user and/or admin emails use JCE for editing the templates. In the e-mails being generated from the form, I sometimes use RS Form if-statements. Here's an example:

<table>
........
{if {mededelingen:value}!=}
<tr>
<td colspan=2 style="text-align: left;">{mededelingen:value}</td>
</tr>{/if}
</table>

This will insert a table row, if a certain requirement is met (if mededelingen is not empty, insert this row).

Both TinyMCE and JCE strip the if-statement from within the table and put it at the top of the mail template: {if {mededelingen:value}!=} {/if}

Is there a way to stop JCE stripping the RS Form code?

Thanks

 

Thom

Ryan

Is there a way to stop JCE stripping the RS Form code?

The only way to retain mixed HTML and shortcode (which in relation to HTML is not actually code, just plain text) is to use Code Blocks in JCE with Custom XML support.

Go to Editor Profiles -> Editor Parameters -> Advanced, and set Enable Code Blocks to Yes and Allow Custom XML to Yes.

In the editor, select XML from the Format list, then in the XML Code Block, type in:

<rsform>

paste in your code, then type in

</rsform>

This will preserve the code, and allow RSForm to process the shortcode tags.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Thomsterdam

Hello Ryan,

That sounds great. It really works well. The formatting and coding are retained as I programmed...

.... (and now I am going to spoil the party)

... What happens is that if I use <br /> or <br> it is stripped from the code. Am I doing something wrong?

Thanx,

 

Thom

Ryan

Please try JCE Pro 2.9.82 RC6 - https://www.joomlacontenteditor.net/downloads/editor/pro/development

Clear your browser cache after install.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Thomsterdam

Hi there,

Thank you so much for putting in a lot of trouble, no less than bringing out a new RC.

I installed this latest RC version and emptied the cache and even got rid of all the cookies and then something went wrong. It seemed that my RSForm if-statements were being ignored, but perhaps I made a mistake.

I am not sure what went wrong but I'll have to do some re-testing before coming back to you with comments.

Thanks again for your support,

 

Thom

Thomsterdam

Hi there,

Something went terribly wrong on my side on Tuesday: somehow I must have messed up the RS Form if-statements which made RS Forms churn out the wrong emails and I got the impression it was caused by your RC, which it was not!

I didn't have time to test everything properly till now and as I had come to expect from you: everything worked like a charm.

Thank you again for bringing out the RC when you did, and I have noticed you have already brought out the stable version.

Regards,

Thom

Ryan

Glad to hear it's all worked out Thom!

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.