You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/components/settings/README.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ To keep our componets as similar when viewed in the web app as when printed. Whe
11
11
Based on the mode the component is being viewed in we have a prop that can be used and then the component be shown in a different state. In the settings instance it means showing all the settings sections expanded.
@@ -22,3 +22,13 @@ If there are any specific print styles these are contained in the section below.
22
22
....
23
23
}
24
24
```
25
+
26
+
27
+
### copy text
28
+
29
+
*Aim:*
30
+
To enable the easy copy and pasting of the settings while also allowing the user to modify the table that has been copied. To do this we need to remove all styles and have a very simple text representation of the table while still keeping its basic format.
31
+
32
+
*In the component:*
33
+
We are using `ClipboardButton` and then have built a text representation of the settings that essentially uses a commandline tool `text-table`. This is then embedded in a `<pre>..</pre>` tag as we want to ensure no styles are copied. All of the work is done in `utils\settings\textData.js` to built the table.
0 commit comments