How to insert shapes in table used in Lectora

vkumar9136
vkumar9136 Community Member Posts: 47 ☆ Roadie ☆
How can I insert a shape in the table? I am able to insert images and equations but there is no options to insert a shape in the cells.

Please find the image attached here. I want to add the shape "Rounded Rectangle" in the table item, as other images and equations are listed under the Table items.

If anyone have any idea about it, Please help.

 

Thanks,

Vimal

Comments

  • klaatu
    klaatu Community Member Posts: 986 ☆ Roadie ☆
    Not sure it will let you, however you can make the same shape in PowerPoint and save it as a picture then insert it as an image.
  • jvalley4735
    jvalley4735 Community Member Posts: 1,310 ♪ Opening Act ♪
    or take a screen capture.  I'm pretty sure you can only insert images into a table and Lectora saves shapes as .an emf.
  • vkumar9136
    vkumar9136 Community Member Posts: 47 ☆ Roadie ☆
    But someone has used the shapes inside the Table. I don't know how?

    Please look at these screenshots.

     

    Thanks
  • jvalley4735
    jvalley4735 Community Member Posts: 1,310 ♪ Opening Act ♪
    Those are most likely symbols or wing dings. You can see a list available here: http://www.alt-codes.net/  It appears to be Alt+220 (▄).
  • rramesh9930
    rramesh9930 Community Member Posts: 3
    I need to insert a customize button in table but I am not able to insert the only option available is to insert image and equation.

     

    Thank you,

    Rajesh
  • jvalley4735
    jvalley4735 Community Member Posts: 1,310 ♪ Opening Act ♪
    The table was probably brought in from an outside source and they choose to leave the formatting in tact. Right now tables are limited to images, special characters and equations.  That's why we recommended you take a picture of what your trying to insert.  I did put in a request with our developers to see about adding buttons into tables in a future version of Lectora.
  • klaatu
    klaatu Community Member Posts: 986 ☆ Roadie ☆
    Almost anything is possible. How badly do you need it? See attached.

    JavaScript:

    $('<input></input>').attr({'type': 'button','id':'btn1'}).val("Custom").click(function(){
    alert('hello');
    }).appendTo($("#text46 > table > tbody > tr> td:first"));

    Substitute #text46 with the HTML name of your table. You can insert your own code in place of the alert('hello'). If you need to target a different cell you will have to learn more about jQuery selectors. You can style the inserted button any way you wish using the external CSS.

    This is a bit complicated for those without web design experience but this should at least point you in the right direction.

    Darrel
  • timk
    timk Community Member Posts: 1,239 ✭ Legend ✭
    It was possible to insert Shapes into tables in older versions of Lectora. But in newer versions shapes are made differently. What you can do is: Create a shape in Lectora, publish to html, find the PNG Lectora has produced from the form in the published "images" folder. The PNG can be used in a textfield / table. This should work as long as you don't use any of the new effects. The PNG is only the straight form, all shadows, reflections, rotations etc. are not included.

    Tim
  • klaatu
    klaatu Community Member Posts: 986 ☆ Roadie ☆
    In the published code, shapes are handled the same way as images. I think Trivantis just goofed here. Its a simple fix for them. They already coded the ability to add images, it's no different. The absolute simplest method to add a shape into a table right now would be to publish with the shape you want outside the table. In the published files will be the .png created out of the shape. Just reopen the .awt,  insert image and select the published shape .png.

    However, this will not help Rajesh with his request which was to to insert a 'customize button'. For that he'll need to code it as I provided or similarly.

    DRS
  • klaatu
    klaatu Community Member Posts: 986 ☆ Roadie ☆
    LOL, Sorry, Tim. I just realized I almost entirely duplicated your post. Duh, I obviously didn't have my morning coffee..