Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions frontend/components/JobPost.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@
<h4 class="text-gray-800 py-4 font-semibold">
About {{ structure }}
</h4>
<p class="text-sm font-extralight pt-4 text-gray-600">
{{ description }}
</p>
<p class="text-sm font-extralight pt-4 text-gray-600" v-html="description"></p>
<p class="text-sm font-extralight pt-4 text-gray-600">
<span class="font-bold text-black">Employment type: </span>Full
time
Expand Down Expand Up @@ -179,6 +177,7 @@ export default {
}
},
cleanText(text) {
text = text.replace(/<[^>]*>?/gm, '')
return text.slice(0, 250) + (text.length > 250 ? '..' : '')
},
},
Expand Down
42 changes: 42 additions & 0 deletions frontend/components/RichTextEditor.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<template>
<client-only>
<vue-editor :value="content" :editor-toolbar="toolbar" @input="$emit('input', $event)"/>
</client-only>
</template>

<script>

export default {
name: "RichTextEditor",
props: {
content: {
type: String,
default: ''
},
toolbar: {
type: Array,
default: () => []
}
}
}
</script>

<style lang="css">
.ql-toolbar.ql-snow {
background-color: #fff;
border-radius: 0.375rem 0.375rem 0 0 !important;
}

.ql-container.ql-snow {
border-radius: 0 0 0.375rem 0.375rem !important;
}

.ql-editor {
background-color: #fff;
}

.ql-container.ql-snow:focus {
background-color: #fff;
}
</style>

7 changes: 5 additions & 2 deletions frontend/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export default {
css: ['~/assets/css/main.css'],

// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: ['plugins/filters.js'],
plugins: [
'plugins/filters.js',
{ src: 'plugins/vue-editor.js', mode: 'client' }
],

// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
Expand All @@ -35,7 +38,7 @@ export default {
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
'@nuxtjs/axios'
],

// Axios module configuration: https://go.nuxtjs.dev/config-axios
Expand Down
Loading