Title: Insert html code
Last modified: August 20, 2016

---

# Insert html code

 *  Resolved [elodieg14](https://wordpress.org/support/users/elodieg14/)
 * (@elodieg14)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/insert-html-code/)
 * Hello,
 * First of all I thank you for the great pluggin. I have even sent you a compensation
   and ask anyone to do so.
 * Anyway, I am trying to add a specific html code to show an availabity calendar
   and nothing appear.
 * How can I add this type of code:
 * <script type=”text/javascript” src=”[http://gadget.open-system.fr/widgets-libs/rel/noyau-1.0.min.js”></script&gt](http://gadget.open-system.fr/widgets-libs/rel/noyau-1.0.min.js”></script&gt);
   
   <script type=”text/javascript” src=”[http://gadget.open-system.fr/widgets-libs/rel/osplanning/osplanning-pack-1.0.min.js”></script&gt](http://gadget.open-system.fr/widgets-libs/rel/osplanning/osplanning-pack-1.0.min.js”></script&gt);
   <script type=”text/javascript”> ( function() { widgetPlanningCodeOs = new AllianceReseaux.
   OsPlanning( { idPanier:”YX9hYWE”, idIntegration:68, langue: “fr”, ui:”OSCH-35935-
   3″ } ); widgetPlanningCodeOs.Initialise(); })(); </script>
 * <div id=”widget-planning-OSCH-35935-3″></div>
 * Thank you very much for your help.
 * Elodie.
 * [http://wordpress.org/extend/plugins/tablepress/](http://wordpress.org/extend/plugins/tablepress/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/insert-html-code/#post-3490118)
 * Hi Elodie,
 * thanks for your post, and sorry for the trouble.
 * Inserting chunks of HTML code into a table cell is tricky. The problem comes 
   from the line breaks in the code. These are automatically converted to HTML `
   <br />` tags, but when these then are part of the JS code, the JS just breaks.
   
   To fix this, you’d have to write the entire HTML and JS code in one line of text,
   i.e. without manual line breaks (but only those that are added automatically 
   by the word wrapping of the browser, due to the width of the the input field).
   Another solution would be to extend the Shortcode of the table to
 *     ```
       [table id=123 convert_line_breaks=false /]
       ```
   
 * This will turn off the automatic replacement of line breaks, so that the HTML/
   JS code should work. You might then just have to fix those cells in your table
   that use line breaks on purpose, by inserting a `<br />` manually.
 * Regards,
    Tobias
 *  Thread Starter [elodieg14](https://wordpress.org/support/users/elodieg14/)
 * (@elodieg14)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/insert-html-code/#post-3490120)
 * Thank you Tobias for your quick response. It’s working either with [table id=
   123 convert_line_breaks=false /] or “write the entire HTML and JS code in one
   line of text” but it seems not possible to have 2 or 3 html code in the same 
   table.
 * If I had different html code in different cells, only the firt availability calendar
   appears.
 * Have you ever experience that?
 * If it’s not possible to get this type of html code in the same table, how can
   I put side by side 2 tables?
 * Thank you very much for your help.
 * Best,
 * Elodie
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/insert-html-code/#post-3490121)
 * Hi Elodie,
 * good to hear that it works for one piece of code with that extra Shortcode parameter.
 * I don’t really know why it’s not working with two pieces of code though. This
   is most likely not caused by TablePress, but by that JavaScript.
    For example,
   you’ll probably need the
 *     ```
       <script type="text/javascript" src="http://gadget.open-system.fr/widgets-libs/rel/noyau-1.0.min.js"></script>
       <script type="text/javascript" src="http://gadget.open-system.fr/widgets-libs/rel/osplanning/osplanning-pack-1.0.min.js"></script>
       ```
   
 * part just for the very first piece of this code on the page.
 * Regards,
    Tobias
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/insert-html-code/#post-3490122)
 * Hi again,
 * oh, and if you are actually just using the table to get things side by side, 
   a better approach might be to use a HTML based layout based on `<div>` elements
   that are styled with CSS, instead of a table.
    The best way to do that could 
   be to use a plugin that can add a “column layout” to a page, like this one: [http://wordpress.org/extend/plugins/grid-columns/](http://wordpress.org/extend/plugins/grid-columns/)
 * Regards,
    Tobias
 *  Thread Starter [elodieg14](https://wordpress.org/support/users/elodieg14/)
 * (@elodieg14)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/insert-html-code/#post-3490141)
 * Dear Tobias,
 * Everything is working well. Thank you.
 * Regards,
 * Elodie.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/insert-html-code/#post-3490142)
 * Hi Elodie,
 * awesome, that’s great to hear 🙂
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](http://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Insert html code’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/insert-html-code/#post-3490142)
 * Status: resolved