gd2md-html icon indicating copy to clipboard operation
gd2md-html copied to clipboard

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

Open burnishedvictory opened this issue 1 year ago • 4 comments

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 avatar Mar 12 '23 08:03 burnishedvictory

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?

burnishedvictory avatar Mar 12 '23 08:03 burnishedvictory

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

sevenshamrocks avatar Aug 04 '24 21:08 sevenshamrocks

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 avatar Aug 05 '24 13:08 evbacher

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 :(

evbacher avatar Aug 06 '24 21:08 evbacher