Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

editing sheet json instructions value (markdown)

1489861857

Edited 1489862305
vÍnce
Pro
Sheet Author
Just curious how other sheet authors handle editing the "instructions" value in your sheet.json file?  It accepts some form of markdown which should be easy enough.  However it would be nice to use a wysiwyg editor.  Since this is a json file and needs to pass jslint, editors seem to basically show you exactly whatever is typed in the instructions, without formatting...  When viewed on roll20's character sheet template preview page, it has been magically formatted.  Is there a way to see what my json instructions will look like prior to making a PR and seeing it live?  Thanks example of using a markdown previewer vs character sheet template preview
1489862828
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I'd also be interested in this answer for writing the one-click install instructions for my scripts.
1489863095

Edited 1489863273
Jakob
Sheet Author
API Scripter
I think you can just any old WYSIWYG markdown editor and replace all newlines in your file with \n afterwards. Seemed to do the trick for me when I did it for one-click instructions.
1489869396
Lithl
Pro
Sheet Author
API Scripter
Jakob said: I think you can just any old WYSIWYG markdown editor and replace all newlines in your file with \n afterwards. Seemed to do the trick for me when I did it for one-click instructions. And replace " with \". Most of the Markdown-in-JSON I've written has been directly in the JSON file, but I think I might have a Markdown renderer in my head. >.>
1489871640

Edited 1489871679
vÍnce
Pro
Sheet Author
Thank you for your comments. &nbsp;The problem really isn't with the markdown. &nbsp;What about getting the json to pass a jslint inspection? Do I need to do something else before running the json thru jslint because it has too many errors to complete the inspection if I simply paste my markdown into the instructions value. &nbsp;Seems that jslint wants everything on a single line (no line breaks), spaces, no tabs, etc. example of what I want to include (key:value for instructions only) "instructions":&nbsp;"#&nbsp;Pathfinder&nbsp;Character&nbsp;Sheet ##&nbsp;Key&nbsp;features -&nbsp;Tab&nbsp;navigation:&nbsp;tabs&nbsp;allow&nbsp;for&nbsp;better&nbsp;organization&nbsp;and&nbsp;faster&nbsp;navigation.&nbsp; -&nbsp;Repeating&nbsp;fields:&nbsp;add&nbsp;as&nbsp;many&nbsp;rows&nbsp;as&nbsp;needed&nbsp;for&nbsp;attacks,&nbsp;abilities,&nbsp;feats,&nbsp;spells,&nbsp;inventory,&nbsp;etc.&nbsp;&nbsp;&nbsp; -&nbsp;Show/hide&nbsp;sub-sections:&nbsp;there&nbsp;are&nbsp;many&nbsp;options&nbsp;to&nbsp;show/hide&nbsp;sections&nbsp;of&nbsp;the&nbsp;sheet. -&nbsp;Settings/configuration&nbsp;tab:&nbsp;show/hide&nbsp;advanced&nbsp;features&nbsp;such&nbsp;as&nbsp;unchained&nbsp;skills&nbsp;and&nbsp;macro-text&nbsp;fields,&nbsp;customize&nbsp;your&nbsp;sheet&nbsp;with&nbsp;font&nbsp;and&nbsp;background&nbsp;choices,&nbsp;header&nbsp;images&nbsp;for&nbsp;roll&nbsp;templates,&nbsp;and&nbsp;much&nbsp;more.&nbsp; -&nbsp;Auto-calculated&nbsp;attributes:&nbsp;ability&nbsp;scores&nbsp;&&nbsp;mods,&nbsp;Skills,&nbsp;HP,&nbsp;Saves,&nbsp;total-attack/damage&nbsp;as&nbsp;guided&nbsp;by&nbsp;the&nbsp;rules&nbsp;as&nbsp;written.&nbsp;&nbsp;Most&nbsp;calculations&nbsp;are&nbsp;handled&nbsp;using&nbsp;sheet&nbsp;worker&nbsp;scripts(javascript)&nbsp;which&nbsp;helps&nbsp;to&nbsp;significantly&nbsp;enhance&nbsp;the&nbsp;sheet's&nbsp;performance. -&nbsp;Conditions&nbsp;and&nbsp;Buffs:&nbsp;toggle&nbsp;conditions&nbsp;and&nbsp;create&nbsp;buffs&nbsp;that&nbsp;automatically&nbsp;adjust&nbsp;attributes&nbsp;across&nbsp;the&nbsp;sheet. -&nbsp;NPC/Monster&nbsp;Parser:&nbsp;drag/drop&nbsp;monsters&nbsp;from&nbsp;the&nbsp;compendium&nbsp;bestiary&nbsp;to&nbsp;the&nbsp;sheet. -&nbsp;HeroLab&nbsp;import:&nbsp;import&nbsp;HeroLab&nbsp;characters&nbsp;to&nbsp;the&nbsp;sheet. -&nbsp;Menu&nbsp;Buttons:&nbsp;use&nbsp;section-specific&nbsp;buttons&nbsp;to&nbsp;produce&nbsp;a&nbsp;menu&nbsp;of&nbsp;relevant&nbsp;roll&nbsp;choices&nbsp;to&nbsp;chat. -&nbsp;and&nbsp;too&nbsp;many&nbsp;features&nbsp;to&nbsp;list... ###&nbsp;Attributes Mouse&nbsp;over&nbsp;any&nbsp;field&nbsp;to&nbsp;get&nbsp;its&nbsp;attribute&nbsp;name&nbsp;to&nbsp;help&nbsp;with&nbsp;token/ability&nbsp;macros. Many&nbsp;field&nbsp;labels&nbsp;also&nbsp;include&nbsp;helpful&nbsp;title&nbsp;text&nbsp;giving&nbsp;a&nbsp;brief&nbsp;explanation&nbsp;of&nbsp;the&nbsp;attribute. All&nbsp;field&nbsp;titles&nbsp;follow&nbsp;Roll20's&nbsp;attribute&nbsp;syntax,&nbsp;ie.&nbsp;AC&nbsp;would&nbsp;be&nbsp;displayed&nbsp;as&nbsp;\"@{AC}\"&nbsp;on&nbsp;mouse-over. ###&nbsp;Rolls You&nbsp;can&nbsp;mouse&nbsp;over&nbsp;any&nbsp;button&nbsp;roll&nbsp;to&nbsp;get&nbsp;its&nbsp;attribute/ability&nbsp;name&nbsp;to&nbsp;help&nbsp;with&nbsp;token/ability&nbsp;macros. Roll&nbsp;button&nbsp;titles&nbsp;follow&nbsp;Roll20's&nbsp;ability&nbsp;syntax,&nbsp;using&nbsp;the&nbsp;selected&nbsp;token,&nbsp;ie.&nbsp;\"%{selected|STR-check}\"&nbsp;or&nbsp;\"@{selected|repeating_weapon_$X_attack-roll\" ###&nbsp;NPC&nbsp;stat&nbsp;block Use&nbsp;the&nbsp;NPC/Monster&nbsp;parser&nbsp;from&nbsp;the&nbsp;NPC&nbsp;tab&nbsp;to&nbsp;drag/drop&nbsp;monsters&nbsp;from&nbsp;the&nbsp;compendium.&nbsp;&nbsp;You&nbsp;may&nbsp;also&nbsp;enter&nbsp;attribute&nbsp;data&nbsp;directly&nbsp;on&nbsp;the&nbsp;NPC&nbsp;tab&nbsp;for&nbsp;easy&nbsp;stat-block&nbsp;input. ##&nbsp;Additional&nbsp;Notes Use&nbsp;the&nbsp;[Pathfinder&nbsp;Sheet&nbsp;Guide]( <a href="https://wiki.roll20.net/Pathfinder_Character_Sheet" rel="nofollow">https://wiki.roll20.net/Pathfinder_Character_Sheet</a> )&nbsp;on&nbsp;the&nbsp;Roll20&nbsp;wiki&nbsp;for&nbsp;more&nbsp;details. Questions,&nbsp;comments,&nbsp;suggestions,&nbsp;please&nbsp;post&nbsp;in&nbsp;the&nbsp;Character&nbsp;Sheets&nbsp;forum:&nbsp;[Pathfinder&nbsp;sheet&nbsp;thread&nbsp;6]( <a href="https://app.roll20.net/forum/post/4735667/pf-pathfinder-sheet-thread-6" rel="nofollow">https://app.roll20.net/forum/post/4735667/pf-pathfinder-sheet-thread-6</a> ) ##&nbsp;Special&nbsp;Thanks **Translations:&nbsp;** &nbsp;-&nbsp;白貓&nbsp;(Traditional&nbsp;Chinese&nbsp;and&nbsp;the&nbsp;first&nbsp;translation&nbsp;done&nbsp;to&nbsp;the&nbsp;Pathfinder&nbsp;sheet.) **Sam&nbsp;M.**(original&nbsp;sheet&nbsp;author) And...&nbsp;everyone&nbsp;in&nbsp;the&nbsp;Roll20&nbsp;community&nbsp;and&nbsp;character&nbsp;sheet&nbsp;beta&nbsp;test&nbsp;game.&nbsp;&nbsp;Thank&nbsp;you&nbsp;for&nbsp;your&nbsp;assistance&nbsp;and&nbsp;support.",
1489872009
Jakob
Sheet Author
API Scripter
What I said above, you just need to replace characters that JSON doesn't like. You've already escaped all the double quotes; you need to replace all line breaks with \n, replace tabs with \t )although I don't see any tabs in your code), etc... . But really, the only thing I see in your markdown that would not work are the line breaks. So just put \n whereever there's a line break using a tool of your choice, and you should be good to go...
1489872083
vÍnce
Pro
Sheet Author
Jakob said: What I said above, you just need to replace characters that JSON doesn't like. You've already escaped all the double quotes; you need to replace all line breaks with \n, replace tabs with \t )although I don't see any tabs in your code), etc... . But really, the only thing I see in your markdown that would not work are the line breaks. So just put \n whereever there's a line break using a tool of your choice, and you should be good to go... Coolio. &nbsp;Thanks