Events Made Easy › Forums › Bug fixed or feature request implemented › advanced editor & #_CAPTCHAHTML{}
- This topic has 4 replies, 2 voices, and was last updated 7 years, 5 months ago by Franky.
-
AuthorPosts
-
Thu 29 Dec 2016 at 06:42 #55891AnonymousInactive
Hello Franky,
in the past I used the following HTML to print a form and hiding the captcha if it would not have been set:
<table class="eme-rsvp-form"> <tbody> <tr> <th scope="row">Name*:</th> <td>#REQ_NAME</td> </tr> <tr> <th scope="row">E-Mail*:</th> <td>#REQ_EMAIL</td> </tr> #_CAPTCHAHTML{<tr bgcolor="#E8E8E8"> <td scope="row">Bitte wiederholen Sie den Code aus dem Bild <small>(Buchstaben bitte kleinschreiben!)</small>:</td> <td>#_CAPTCHA</td> </tr>} </tbody> </table> <p>#_SUBMIT</p>
But the advanced editor now turns this into:
<p>#_CAPTCHAHTML{}</p> <table class="eme-rsvp-form"> <tbody> <tr> <th scope="row">Name*:</th> <td>#REQ_NAME</td> </tr> <tr> <th scope="row">E-Mail*:</th> <td>#REQ_EMAIL</td> </tr> <tr bgcolor="#E8E8E8"> <td scope="row">Bitte wiederholen Sie den Code aus dem Bild <small>(Buchstaben bitte kleinschreiben!)</small>:</td> <td>#_CAPTCHA</td> </tr> </tbody> </table> <p>#_SUBMIT</p>
I don’t know if the issue is that I’m using a table, but in the past this was not an issue.
May I kindly ask you to check this and advise me please?
Thanks a lot!
Cheers
JoergThu 29 Dec 2016 at 09:27 #55895FrankyKeymasterUnfortunately that is the way the wordpress editor just works …
If you type this in the text field (and not the html field), is it not ok there?Thu 29 Dec 2016 at 09:36 #55896AnonymousInactiveIt is, but when switching to the advanced editor it changes, so when you change it (too easily) by mistake you break your code.
Thu 29 Dec 2016 at 09:38 #55897FrankyKeymasterHmmm … based on http://archive.tinymce.com/forum/viewtopic.php?id=26030
and https://codex.wordpress.org/TinyMCE
I think we need to play with the filter tiny_mce_before_init for it to work ok …
Or, something like:wp_editor( $distribution, 'distribution', array( 'tinymce' => array( 'cleanup_on_startup' => false, 'trim_span_elements' => false, 'verify_html' => false, 'cleanup' => false, 'convert_urls' => false, ), ) );
Edit, and since we already use some settings, can you try changing the lines:
$eme_editor_settings = array( 'media_buttons' => false, 'textarea_rows' => 5 );
to:
$eme_editor_settings = array( 'media_buttons' => false, 'textarea_rows' => 5, 'tinymce' => array('cleanup_on_startup' => false, 'trim_span_elements' => false,'verify_html' => false,'cleanup' => false,'convert_urls' => false));
These lines appear once in eme_UI_helpers.php and 2 times in eme_templates.php
Sun 11 Jun 2017 at 23:48 #56248FrankyKeymasterI think/assume the latest version(s) take care of this, so this should be ok now.
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.