-
Notifications
You must be signed in to change notification settings - Fork 22
Markdown format & styling #1
Comments
The code looks fine from what I can tell. Can you validate that the generated JSON matches what you expected? You can get it by running |
Thanks for the .as_json tip- with it I was able to parse out pretty much what I needed. I was never able to get the inline styles to work, but I was able to reference a "style" defined in the Default styles that gave me the control I was looking for. I have gotten one more hitch in trying to build a header component which has a layout, style and components that make it up. I am able to get the correct json output for the first two, but it will not recognize the components. Here is a simple version of the code: which comes up
I have tried every way I can think of to write it out and the only way I can get components to show is if I do which gives the predictable
Thanks again |
Any thoughts on this? |
I am a bit confused about how to get the markdown format for body to work and how to make styles for each heading. The text comes in all as the default and ignores the markdown.
Here are examples:
document.components << AppleNews::Component::Body.new(text: self.body, format: "markdown")
and
document.components << AppleNews::Component::Heading.new(text: self.title, role: :heading1, text_style: { font_name: 'AvenirNext-Bold', font_size: 14 })
Thank you
The text was updated successfully, but these errors were encountered: