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

HTML conversion doesn't properly convert text that's center aligned #123

Open
burnishedvictory opened this issue Mar 12, 2023 · 4 comments

Comments

@burnishedvictory
Copy link

Thank you for writing this software! It's awesome.

When I convert something to HTML, stuff that is center aligned in the Google doc gets converted to left justified in the HTML. If it's right-justified in the Google doc, then it converts properly to HTML, but not center.

Is this intended behaviour, or is this a bug?

Thanks!

@burnishedvictory
Copy link
Author

burnishedvictory commented Mar 12, 2023

Also, a particular request, if you do fix this. The site I'm posting to doesn't seem to obey the "text-align:center code, but it does obey < center > < /center > (with proper code removed or it centered my text and disappeared my code examples). Would it be possible to have an option for center to work that way?

@sevenshamrocks
Copy link
Contributor

I am having the same issue. Centered text has no modification in the HTML conversion.

@evbacher
Copy link
Owner

evbacher commented Aug 5, 2024

Sorry I missed this -- it should be possible, since there is a horizontal alignment attribute for paragraphs in Google Docs. I'm leaving a link to the docs for myself when I get to this: https://developers.google.com/apps-script/reference/document/attribute.

I do have a bit of time and I'm trying to fix a few of the outstanding bugs and maybe add some nice features as well.

@evbacher
Copy link
Owner

evbacher commented Aug 6, 2024

I'm not sure what site you're posting to, but I'll probably implement this as <p style="text-align: center"> instead of using <center> tags.

Note: GitHub wiki doesn't seem to observe either tag: all the test paragraphs are left-justified :(

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

No branches or pull requests

3 participants