Copy and paste Code Snippets -- preserving indentation

This forum is for all Flare related Tips and Tricks.
Have a tip or trick you use while working in Flare? Share it here.

Copy and paste Code Snippets -- preserving indentation

Postby scooter262 on Wed May 27, 2020 12:37 pm

Hi all,

I've been testing out the new code snippets in the latest version of Flare (2020). We have customers who want to be able to copy the code from our guides and then into their own text editors, and they want the indentation in the code block to be preserved. Apparently, in YML, the indentation of the code lines is significant. I programmed a bit before becoming a writer, and no language I ever used depended on indentation -- that was just to make reading/maintaining the code easier for human readers. YML is not one of the choices for the language to use when inserting a code snippet, but I was wondering if any of the choices will preserve the indentation level of the lines in a block of code that is in a Code Snippet.

So, my question is whether ANY of the available choices for code language will preserve the indentation levels when customers copy the text from a PDF or HTML page.
scooter262
Propeller Head
 
Posts: 37
Joined: Wed Mar 11, 2009 11:14 am

Re: Copy and paste Code Snippets -- preserving indentation

Postby Dafra08 on Fri May 29, 2020 4:00 am

Hi,

I am trying out the code snippet feature as well. Using the XML language will preserve the indentation when the copy button is used in HTM files. Copying the code itself and pasting seems to work too. Note: When I click the Copy button in the code snippet the page jumps to the top. I hope this hickup will be fixed shortly.

Now I am just trying to figure out how to highlight certain parts of the code within the code snippet ...
Dafra08
Propeller Head
 
Posts: 11
Joined: Fri Aug 16, 2019 1:02 am


Return to Tips and Tricks

Who is online

Users browsing this forum: No registered users and 3 guests