Trying to install and use framework for my blog. I followed the instructions on their documentation but nothing was displayed, please help.
I have tried installing framework7 and framework7-vue version 8.3.3.
In my main.js I have included the following code,
import { createApp } from 'vue'
import App from './App.vue'
import Framework7 from 'framework7/lite'; // Import Framework7
import Framework7Vue, { f7, f7Page, f7Navbar, f7Block, f7TextEditor } from 'framework7-vue'; // Import Framework7-Vue
Framework7.use(Framework7Vue); // Init Framework7-Vue
const app = createApp(App);
// Register Framework7-Vue components
app.component('f7', f7);
app.component('f7-page', f7Page);
app.component('f7-navbar', f7Navbar);
app.component('f7-block', f7Block);
app.component('f7-text-editor', f7TextEditor);
app.mount('#app');
and in my Vue component I tried to import and use framework7 text editor component
<script>
import { f7Page, f7TextEditor } from "framework7-vue";
import { ref } from "vue";
export default {
components: {
f7Page,
f7TextEditor,
},
setup() {
const editorContent = ref("");
const editorButtons = [
["bold", "italic", "underline", "strikeThrough"],
["orderedList", "unorderedList"],
["paragraph", "h1", "h2", "h3"],
["alignLeft", "alignCenter", "alignRight", "alignJustify"],
["subscript", "superscript"],
["indent", "outdent"],
];
return { editorContent, editorButtons };
},
};
</script>
<template>
<div class="create">
<form>
<input type="text" placeholder="Title" />
<input type="text" placeholder="Summary" />
<input type="file" placeholder="Select file" />
<f7-page>
<f7-navbar title="Text Editor"></f7-navbar>
<f7-block>
<f7-text-editor
placeholder="Enter text..."
:buttons="editorButtons"
v-model="editorContent"
/>
</f7-block>
</f7-page>
<textarea cols="30" rows="10"></textarea>
<button type="submit">Post</button>
</form>
</div>
</template>
<style></style>
Why is it not working, any help appreciated, thanks.