• Resolved juanmb

    (@juanmb)


    Hi, I’m using some code inside some cells
    here an example:

    <ul><li>
    <input type="checkbox" checked><i></i>
    <h2 class="accordion-title">
    [skipto time=00:00:45]timestamp and title of accordion[/skipto]
    </h2>
    
     <p class="accordion-content">
    [skipto time=00:46:42]timestamp 1[/skipto] 
    </p>
    
     <p class="accordion-content">
    [skipto time=00:47:24]timestamp 2[/skipto] 
    </p>
    
     <p class="accordion-content">
    [skipto time=00:48:22]timestamp 3[/skipto] 
    </p>
    
    </li></ul>

    this code repeats in some cells… and the problem is that
    this code -> <input type=”checkbox” checked>
    disappears everytime one of the editors edit the table and save…
    when I save or edit the table this problem never happens, this is only happening to other editor of the website.(He is not deleting the code, it happens automatically after saving)
    I have administration permissions but this user is just an editor… I don’t know if this is related…

    would appreciate any hint to find where is the problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The reason for this indeed is that that user is “only” an Editor. This means that WordPress does not give him the rights to use such HTML code (because it could be abused for hacking attempts). Therefore, WordPress removes this HTML code whenever an Editor saves a post, page, or table.

    As a workaround, you could maybe define this as the output of a custom Shortcode. For example, add this to the “functions.php” file of your theme:

    add_shortcode( 'checkbox', 'juanmp_checkbox_shortcode' );
    function juanmp_checkbox_shortcode( $atts, $content ) {
      return '<input type="checkbox" checked>';
    }

    Then, you can use

    [checkbox /]
    

    instead of the HTML code in the table cells.

    Regards,
    Tobias

    Thread Starter juanmb

    (@juanmb)

    I was expecting it hehe thanks for clarify me this. I will try to fix it the way you say. ?? Thanks a lot.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘code disappear when some user saves the table changes’ is closed to new replies.