Remove mock content, output composer HTML text, add clear button

Also listening for editor change event. Preparation for auto-save and posting.
parent 081f2af6
......@@ -41,39 +41,16 @@
v-model='editorContent'
ref='textEditor'
:options='editorOption'
@change='editorChange($event)'
></quill-editor>
</no-ssr>
<div class='compose-tools'>
<button ref="postButton" class='button is-medium is-primary'>Post</button>
<button @click='editorContent=""' ref='clearButton' class='button is-medium'>Clear</button>
<button ref='postButton' class='button is-medium is-primary'>Post</button>
</div>
</div>
<article>
<h1>Should Data Scientists Adhere to a Hippocratic Oath?</h1>
<a href='https://www.wired.com/story/should-data-scientists-adhere-to-a-hippocratic-oath/'>Wired article.</a>
<figure>
<img src='https://s3-eu-central-1.amazonaws.com/mastodon-aral/media_attachments/files/000/287/566/original/3af31eb931617bb7.jpeg'>
</figure>
<p class='summary'>A growing amount of my time is being spent countering Silicon Valley spin:</p>
<p class='summary'>Aral Balkan argues that an ethics code like that drafted this week could actually worsen societal harms caused by technology. He fears it will be used by corporations as a signal of virtue, while they continue business as usual. “What we should be exploring is how we can stop this mass farming of human data for profit…”
</p>
<div class='metadata'><img class='profile-image-small' src='/profile-image.jpg' alt='Profile image'>Today.</div>
</article>
<article>
<h1>The Punk Rock Internet</h1>
<p class='summary'>Around the world, a handful of visionaries are plotting an alternative ​online ​future​.​ ​Is it really possible to remake the internet in a way that’s egalitarian, decentralised and free of snooping​?​</p>
<figure>
<img src='/2560.jpg' alt='Brightly-colour illustration with a wireframe globe, a saw gear, a lock, a thumbs up sign, a shopping trolley and a wifi symbol with a pixellated background in two-tone pink and greenish-yellow.'>
</figure>
<p>The office planner on the wall features two reminders: “Technosocialism” and “Indienet institute”. A huge husky named Oskar lies near the door, while the two people who live and work here – a plain apartment block on the west side of Malmö, Sweden – go about their daily business.</p>
<div class='metadata'><img class='profile-image-small' src='/profile-image.jpg' alt='Profile image'>2 days ago.</div>
</article>
<pre style='word-break: break-word;'>{{ editorContent }}</pre>
</b-tab-item>
<b-tab-item label="Everyone"></b-tab-item>
......@@ -125,6 +102,12 @@ export default {
}
},
methods: {
editorChange ( { quill, html, text } ) {
console.log(quill, html, text)
}
},
data() {
return {
mockSearchData: [
......@@ -321,7 +304,11 @@ article h1 {
.button.is-medium {
font-size: 1.5vmax;
float: right;
}
.button.is-medium:not(:first-of-type)
{
margin-left: 1vmax;
}
.compose {
......@@ -330,6 +317,7 @@ article h1 {
.compose-tools {
height: 3.4vmax;
text-align: right;
}
.quill-editor {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment