Hi I'm adding a cool copy to clipboard feature (first picture) to my web site and I'm having problems aligning the copied text. The second picture shows what I get. I'm putting spaces in the code but I know that will never work since the values will be changing. I think I need to use tables but I wanted to ask if they will work in a textarea before I spend 10 hours trying different things.
If It does work, can someone show me how to insert them into the textarea?
I would like the copied text to look like picture 3. I have tried to insert my code into this post using blockquote but it does not seem to be working in preview - in case it is not 4th picture is the code as I have it now....
Well it is going to be fun, but here is the basics of the format of a table, if this is going to work in a textarea or not i really have no clue so just give it a try and if not go back.
<table>
<tbody>
<tr>
<td>Content of first cell here</td>
</tr>
</tbody>
</table>
So using that in your situation considering how you need to do things I would imagine it looking something like
The only strange concepts you might find in the code are colspan which just means take X columns of space, rowspan means take X rows of space, is just a non breaking space to force the full space to be used, " which just means double quotation marks (I need this every now and again because i need to use double quotes but do not want to break out of the double quotes the entire string of code is already in), align which i think i only need one cell set to right and it should do that entire column.
Yes, I looked it up before I posted and tried it but things went bad - the problem is I don't know if I just added in a typo that made it get messed up or if it just does not work in a textarea. So hard to do it in the code and I spent about 3 hrs today trying to figure out why nothing was working and it was the textedit Mac app changing quotes to curly quotes. Does everyone work in something like text wrangler or is there something better?
I tried what you provided but nothing goes to the clipboard. I commented out the stuff I typed in and pasted your example. BTW, how do you get the code to appear in the blockquote (in your post) - I tried and all I got was a blank box (and I tried it about 5 different ways.....)
Just another country keyboard layout, it is often between the TAB and ESC key.
looks like i will have to test this more and come back to you on it, I assume the dmx-html should work as it is parsing the html i would think but I am not sure what your code looks like to get the value from the textfield, can you please show me that.
Also could you add back the dmx-html example and diect me to the page it is on so i can see what property or attribute you are going to need to get out of it.
<button onclick="myFunction()" style="border-radius: 6px; font-weight: bold; text-align: center;">Copy to clipboard</button>
and this
<script>
function myFunction() {
var copyText = document.getElementById("myInput");
copyText.select();
document.execCommand("copy");
alert("Copied To Clipboard: " + '\n' + copyText.value);
}
Iâm doing everything local so as not to break my live pages but I can push up a new calculation page and give you the link to it (if that is what you mean). Not a problem since it will not be linkable from the live site but the copy I point you to will jump to the live site (which will not have this code if you switch to a different calculation method (like by ounces or by grams).
I hope that is not confusing - I may not have all the right terminology in my brain chassis yetâŚ
And this is why Patrick exists, lol, much easier doing it like that, I was thinking of adding a \t for a tab but depending on length it could have become quite messy.
@norcoscia, just checking you understand what Patrick is suggesting?
So go back to your original that you know works and add formatters to move elements where you need them to be to line up instead of multiple spaces you are adding space in a far far cleaner way.
I donât think this will work - one example â person A uses 65% water, person B uses 64.5% in their formula. With different decimal place values, there is no way to guarantee alignment. Is there a way to have certain values align right.
Also, when I get to yeast the variable (type) input by the user is placed between the word âYeastâ and the input value compounding the problems - I need the equivalent of a tab(s)
Same with additional items⌠further down the list.
If you want to have plain text then the pad formatter is the best way, also it will only correctly align with a monospaced font (fixed width). Also make sure that the length of the pad formatter is high enough to contain the longest text. Depending on where you paste it, an html table will probably not work correctly.
Norm,
Could you please open new topic for different issues you are having?
In this case if you are using form values for the formula, you are missing tonumber formatting added to them âŚ