@bbob/vue2
v4.2.0
Published
A BBCode to Vue2 Renderer part of @bbob
Downloads
482
Readme
@bbob/vue2
Converts @bbob/parser AST tree to Vue 2
npm i @bbob/vue2 @bbob/preset-vue
import Vue from 'vue'
import VueBbob from '@bbob/vue2';
Vue.use(VueBbob);
<template>
<div class="vue2">
<h2>Generated vue2 here</h2>
<bbob-bbcode container="div" :plugins="plugins">{{ bbcode }}</bbob-bbcode>
</div>
</template>
<script>
import Vue from 'vue'
import preset from '@bbob/preset-vue'
export default Vue.extend({
name: 'App',
data() {
return {
bbcode: 'Text [b]bolded[/b] and [i]Some Name[/i]',
plugins: [
preset()
],
}
}
})
</script>