Skip to content

Instantly share code, notes, and snippets.

View papakay's full-sized avatar

Kehinde Alabi papakay

View GitHub Profile
@izzygld
izzygld / Wysiwyg.vue
Created January 9, 2019 14:06
Adding a “show html” button in Quill (Wysiwyg).
<template>
<div>
<vue-editor v-model="content" ref="editor" :editor-options="toolbarOptions" @text-change="updateValue" useCustomImageHandler @imageAdded="uploadImage"></vue-editor>
</div>
</template>
<script>
import Vue from "vue";
import axios from 'axios'
let VueEditor, Quill;
// I'ts ugly but works
$('.pagination').each(function(){
var allLi = $(this).find('li');
if(allLi.length > 20) {
var activeId = allLi.filter('.active').index();
allLi.eq(0)
.add(allLi.eq(1))
.add(allLi.eq(2))
.add(allLi.eq(3))
.add(allLi.eq(4))