Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bullets do not work with text objects in addText() method #44

Closed
ellisgl opened this issue Feb 14, 2017 · 2 comments
Closed

Bullets do not work with text objects in addText() method #44

ellisgl opened this issue Feb 14, 2017 · 2 comments
Assignees

Comments

@ellisgl
Copy link
Contributor

ellisgl commented Feb 14, 2017

I've tried a couple way to make a bullet list - but it's not working as expected:

Test 1:

                     slide2.addText(
                         [
                             {
                                 text: '1st point.'
                             },
                             {
                                 text: 'Something...'
                             }
                         ],
                         {
                             x: 7.75,
                             y: 1.3,
                             w: 2.17,
                             h: 5.5,
                             valign: 'top',
                             margin:0.1,
                             font_face: 'Arial',
                             font_size: 12,
                             bullet: true
                         });

Test 2:

                     slide2.addText(
                         [
                             {
                                 text: '1st point.',
                                 options: {
                                     bullet: true,
                                 }
                             },
                             {
                                 text: 'Something...',
                                 options: {
                                     bullet: true,
                                 }
                             }
                         ],
                         {
                             x: 7.75,
                             y: 1.3,
                             w: 2.17,
                             h: 5.5,
                             valign: 'top',
                             margin:0.1,
                             font_face: 'Arial',
                             font_size: 12,
                             bold: false,
                         });
@gitbrent gitbrent self-assigned this Feb 14, 2017
@gitbrent gitbrent changed the title Bullets not working? Bullets do not work with text objects in addText() method Feb 16, 2017
@gitbrent gitbrent changed the title Bullets do not work with text objects in addText() method Bullets do not work with text objects in addText() method Feb 16, 2017
gitbrent pushed a commit that referenced this issue Feb 26, 2017
…; Support for bullets in text objects.

Added ‘newPageStartY’ option for tables. Fixes Issue #44, Issue #43,
Issue #47, Issue #48.
@gitbrent
Copy link
Owner

Hi @ellisgl ,

Thanks for opening this issue.

I'm pleased to report that bullets within text objects are now supported.

Example:

slide.addText(
  [
    { text:'I am a text object with bullets.. ', options:{bullet:true, color:'CC0000'} },
    { text:'and i am the next text object!'    , options:{bullet:true, color:'00CD00'} },
    { text:'Text object without bullet:true.. ', options:{font_size:12} },
    { text:'then this is a text object too!'   , options:{font_size:12} },
    { text:'Final text object w/ bullet:true!!', options:{bullet:true, color:'0000AB'} }
  ],
  { x:8.0, y:5.0, w:'30%', h:1.4, color:'ABABAB', margin:1 }
);

screen shot 2017-02-26 at 17 59 44

@gregroyal
Copy link

This doesnt seem to work correctly anymore? I used this exact snippet and it doesnt bullet items correctly.

The issue I'm running into is if i start a bulleted list, the bullets dont stop if its within the same text block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants