FileWriter




Forrás:

<template>
  <div id="app">
    <div id="xx">
        <textarea v-model="text"></textarea>
        <br>
        <br>
        <a  id="ax"
            v-if="text.length"
            download="ment.txt"
            :href="`data:text/plain;charset=utf-8,${ encodeURIComponent(text) }`"
            >Letöltés szövegfájlként (ment.txt)</a>
        <hr>
    </div>
  </div>
</template>

<script>
export default {
  data() { return { text: "" } }
};
</script>

<style>
div#xx {
    text-align: center;
}
a#ax {
    margin: 7px;
    padding:6px;
    box-shadow: 1px 1px 3px black;
    border-radius: 5px;
    background-color: #edface;
    font-weight: bold;
}
a#ax:hover {
    text-decoration: none;
    background-color: #b3c687;
    box-shadow: 1px 1px 1px rgb(114, 114, 114);
    color: aliceblue;
    text-shadow: 0px 0px 6px black;
}
textarea {
    width: 700px;
    height: 200px;
    font-size: 16px;
}
</style>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Utoljára frissítve: 2/4/2020, 4:34:44 PM