Events Made Easy Forums Bug fixed or feature request implemented advanced editor & #_CAPTCHAHTML{}

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #55891
    Anonymous
    Inactive

    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
    Joerg

    #55895
    Franky
    Keymaster

    Unfortunately 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?

    #55896
    Anonymous
    Inactive

    It is, but when switching to the advanced editor it changes, so when you change it (too easily) by mistake you break your code.

    #55897
    Franky
    Keymaster

    Hmmm … 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

    #56248
    Franky
    Keymaster

    I think/assume the latest version(s) take care of this, so this should be ok now.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top