aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2018-08-31 03:54:37 +0000
committerkaniini <nenolod@gmail.com>2018-08-31 03:54:37 +0000
commit84aa1ecdcd9b7dce53761d84e99f0105a2093280 (patch)
treee22cd240cbae010fe4ea521ca5012e109229300c /src/components
parent2dd99c7dd95e6af2c177172c09370a5193016f3b (diff)
parentcabcb5c81b2d0018e07448f2d1bf72f5aa6e42e0 (diff)
Merge branch 'feature/rich-text' into 'develop'
initial rich text authoring support See merge request pleroma/pleroma-fe!325
Diffstat (limited to 'src/components')
-rw-r--r--src/components/post_status_form/post_status_form.js7
-rw-r--r--src/components/post_status_form/post_status_form.vue20
2 files changed, 20 insertions, 7 deletions
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index 06a428ff..7d2735c5 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -55,6 +55,7 @@ const PostStatusForm = {
newStatus: {
spoilerText: this.subject,
status: statusText,
+ contentType: 'text/plain',
nsfw: false,
files: [],
visibility: this.messageScope || this.$store.state.users.currentUser.default_scope
@@ -210,13 +211,15 @@ const PostStatusForm = {
sensitive: newStatus.nsfw,
media: newStatus.files,
store: this.$store,
- inReplyToStatusId: this.replyTo
+ inReplyToStatusId: this.replyTo,
+ contentType: newStatus.contentType
}).then((data) => {
if (!data.error) {
this.newStatus = {
status: '',
files: [],
- visibility: newStatus.visibility
+ visibility: newStatus.visibility,
+ contentType: newStatus.contentType
}
this.$emit('posted')
let el = this.$el.querySelector('textarea')
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
index 9f8b2661..8b8eeae0 100644
--- a/src/components/post_status_form/post_status_form.vue
+++ b/src/components/post_status_form/post_status_form.vue
@@ -32,11 +32,21 @@
@input="resize"
@paste="paste">
</textarea>
- <div v-if="scopeOptionsEnabled" class="visibility-tray">
- <i v-on:click="changeVis('direct')" class="icon-mail-alt" :class="vis.direct" :title="$t('post_status.scope.direct')"></i>
- <i v-on:click="changeVis('private')" class="icon-lock" :class="vis.private" :title="$t('post_status.scope.private')"></i>
- <i v-on:click="changeVis('unlisted')" class="icon-lock-open-alt" :class="vis.unlisted" :title="$t('post_status.scope.unlisted')"></i>
- <i v-on:click="changeVis('public')" class="icon-globe" :class="vis.public" :title="$t('post_status.scope.public')"></i>
+ <div class="visibility-tray">
+ <span class="text-format">
+ <select v-model="newStatus.contentType" class="form-control">
+ <option value="text/plain">{{$t('post_status.content_type.plain_text')}}</option>
+ <option value="text/html">HTML</option>
+ <option value="text/markdown">Markdown</option>
+ </select>
+ </span>
+
+ <div v-if="scopeOptionsEnabled">
+ <i v-on:click="changeVis('direct')" class="icon-mail-alt" :class="vis.direct" :title="$t('post_status.scope.direct')"></i>
+ <i v-on:click="changeVis('private')" class="icon-lock" :class="vis.private" :title="$t('post_status.scope.private')"></i>
+ <i v-on:click="changeVis('unlisted')" class="icon-lock-open-alt" :class="vis.unlisted" :title="$t('post_status.scope.unlisted')"></i>
+ <i v-on:click="changeVis('public')" class="icon-globe" :class="vis.public" :title="$t('post_status.scope.public')"></i>
+ </div>
</div>
</div>
<div style="position:relative;" v-if="candidates">