-
Notifications
You must be signed in to change notification settings - Fork 666
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
[Feature request] Multiple text objects in one line without bullets or with align #369
Comments
abc_def_ is supposed to be abc and def in italic, but GitHub’s italic specified doesn’t seem to like prepending non-whitespace chars. |
+1 ... I've just come across this limitation. |
@bigianb If you really need this feature now, you can try using my patch above, it’s literally inserting the check
into
From my experience it works, but I didn’t try anything too special. Hm, maybe one should change this to NO ONE SHOULDN’T, I JUST DID NOT THINK WHEN WRITING THIS BIT!
thus using this option only if it’s explicitely set to false ... |
I don't see where the library lacks the ability to format on a word-level basis. This adds italics and bold without forcing a line-break or requiring bullets:
|
@gitbrent Your code does not use any kind of align, add align:'center' to the options and you end up with |
Using the code
|
But alignment necessitates a paragraph as you cant align words... |
But you still have a paragraph, you just don’t add one for each text object. The problem is, that, as soon as an align is specified, you add one |
Okay, so what problem are we trying to solve? Do you have a screencap of the PptxGenJS output versus the result you're looking for. |
@vpetzel, great job on writing this up and providing a fix in the mean time. I'm running into the same issue with this library when I want to style individual words in the PPT. I couldn't figure this out for the longest time but as you mentioned, it only occurs if you're using the 'align' options, which is a pretty common use case. Adding your patch works great. It should be included in the base library, or if the regular functionality doesn't want to be changed, then add a new config property for the "don't break" scenario. |
Any news on this ? I am facing the same issue. |
I'll get this patched in an upcoming release.
|
hey @gitbrent, I just tried this in the 3.0.0-beta.4 and the problem is unfortunately still there. |
Related: Issue #258 |
Fix for gitbrent#369
Fixed via #751 |
The current system will not allow for multiple text objects without break if there is no bullet or some kind of align specified. This turns into a Problem if you consider, that text formatting (italic, bold, underlinde, strike, ...) are global to one text object. This means, that even code like this
is not able to achieve this: abc_def_, but will output two seperate lines for abc and def.
This could be easily mended by adding an additional attribute to the text objects, let’s say, break, and change line 3668 from
to
and using the code
which will achieve the desired effect.
See this patch:
pptxgen.js.patch.txt
The text was updated successfully, but these errors were encountered: