Home>Support>PageBuilder text editor – text mode – onclik=… disappears when reediting

PageBuilder text editor – text mode – onclik=… disappears when reediting

Hi and thanks for this excellent plugin.
I have to expand or collapse a list by clicking on its title, and therefore wrote a little JavaScript called thru an “onclick” attribute.
It works fine BUT when I come back to the editor, the ‘onclick’ attribute disappears.

I use WP 4.8.2, PageBuilder 2.5.12, Widgets Bundle 1.9.10, Tiny MCE Advanced 4.6.3 (which I use for the posts that have not been converted to PageBuilder)

Here is the code I first enter (and it works) :
http://sandbox.latabledecana.com/wp-content/uploads/2017/09/the-text-I-want.jpg

Here is the text I find, after updating the post and then going back to the editor :
http://sandbox.latabledecana.com/wp-content/uploads/2017/09/the-text-I-get-back.jpg

I wonder what I’m doing wrong. Thanks for your help !

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 3 days ago Alex S
    Hi, I Work Here

    Hi,

    I’d like to help you with this, but unfortunately, this is beyond the scope of the support we’re able to offer on our free forums. There is a fair amount of custom work involved.

    We do offer this level of support to our premium users, so if you’d like to upgrade to SiteOrigin Premium, then I can help you over email support.

    Consider using the Custom HTML widget instead of the SiteOrigin Editor widget.

    If you’d prefer not to upgrade to SiteOrigin Premium, then you can hire a WordPress developer from Codeable. They’ll charge you an hourly rate for any work done.

  2. Here we are … Premium ! So what should I do now ?

    Thanks for helping !

    <https://latabledecana.com/&gt; Sign_Mail_PhD

  3. 7 years, 1 day ago Alex S
    Hi, I Work Here

    Hi,

    Would it be possible for you to create a temporary admin account for us so we can log in and take a look?

    By the way, as you’re a premium user, you’re entitled to priority email support. If you would like to make use of that, please follow the instructions found on your Page: Dashboard (please refer to the support tab). Please reference this thread and include your SiteOrigin order key in the email.

  4. 7 years, 1 day ago Private Message - Alex S Hi, I Work Here

    This is a private message.

  5. 7 years, 1 day ago Private Message - WordPress

    This is a private message.

  6. For your Information :

    sandbox.latabledecana.com is a development and test site for « latabledecana.com ». It’s password-protected : password = Private Snippet

    The post in which you can find the html code with « onclick= » scratched at edition is the 4th one (« Devenir bénévole » – id = 1001). In that post, look at every 2 columns rows of widgets.

    Here is the code I first enter (and it works) :
    http://sandbox.latabledecana.com/wp-content/uploads/2017/09/the-text-I-want.jpg

    Here is the text I find, after updating the post and then going back to the editor :
    http://sandbox.latabledecana.com/wp-content/uploads/2017/09/the-text-I-get-back.jpg

    The javascript is defined in « réglages / Insert Headers and Footers ».

    Thanks for helping ! Regards.

    <https://latabledecana.com/&gt; Sign_Mail_PhD

  7. Did you receive this msg ?

    <https://latabledecana.com/&gt; Sign_Mail_PhD

  8. 6 years, 11 months ago Alex S
    Hi, I Work Here

    Hi,

    Sorry for the delay.

    WordPress will filter out all usage of onclick when the editor mode changes as it’s not an attribute it allows – this can be changed but it’s not recommended. Your best option would be to move the pictured HTML to a Custom HTML widget rather than a SiteOrigin Editor widget. The Custom HTML Widget doesn’t alter the code in any way so it’ll, in turn, avoid this issue from happening.

  9. Hi Alex,

    Done. It works fine !

    Thanks.

  10. 6 years, 11 months ago Alex S
    Hi, I Work Here

    Hi,

    Great to hear. Is there anything else I can (hopefully) help you with today? If not, have a good one mate.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More