chmln / vue-wysiwyg

A lightweight WYSIWYG HTML editor for Vue.js
https://chmln.github.io/vue-wysiwyg/
MIT License
555 stars 134 forks source link

Configuration not working to hide modules! #17

Closed jazibsawar closed 6 years ago

jazibsawar commented 6 years ago

I used the sample code to initiate this component but hideModule is not working in configuration for v1.2.6.

Vue.use(wysiwyg,{ hideModules: { "bold": true, "table": true, "image": true } })

annibuliful commented 6 years ago

{ hideModules: { "bold": true }, image: { uploadURL: "/api/myEndpoint", dropzoneOptions: {} } }

jazibsawar commented 6 years ago

Not working. Not hiding the modules. I think it is a bug.

annibuliful commented 6 years ago

I think its support only "bold"

jazibsawar commented 6 years ago

But for me Bold is not working too. I am looking at the code. May be dev can help in this

annibuliful commented 6 years ago

Ok, I will try to fix it.

annibuliful commented 6 years ago

this repo is not mine but I will create PR for fix it

annibuliful commented 6 years ago

hideModules: { bold: true ,italic:true}

I think to update your modules and remove double quote

annibuliful commented 6 years ago

my configuration its work.

jazibsawar commented 6 years ago

I will try this. Thanks a lot @lagmanzaza

jazibsawar commented 6 years ago

Without quotes also not working. Can you tell me how you are loading this compotent? I am loading this in main.js import wysiwyg from "vue-wysiwyg"; Vue.use(wysiwyg,{ hideModules: { bold: true, table: true, image: true } })

Then I my components I do <wysiwyg v-model="recipeModel.content" />

annibuliful commented 6 years ago

Did you forget to add @import "~vue-wysiwyg/dist/vueWysiwyg.css"; to your CSS file

jazibsawar commented 6 years ago

No i didn't. It is looking great otherwise

mgyugcha commented 6 years ago

Hi, I have the same problem :S

jazibsawar commented 6 years ago

I have achieved that by using simple css. @mgyugcha

chmln commented 6 years ago

Hello,

Please see if v.1.2.7 fixes the problem. Thank you.

jazibsawar commented 6 years ago

Yes, @chmln it fixed it. Awesome.

rugor commented 6 years ago

This issue persists for me in v. 1.2.7

Config:

import wysiwyg from "vue-wysiwyg"
Vue.use(wysiwyg, {
  hideModules: { 
    "headings": true,
    "hyperlink": true,
    "image": true,
    "table": true,
    "separator": true
  }
})

Yields: screenshot 2017-10-10 10 59 04

Resolving with css for now

jazibsawar commented 6 years ago

@rugor try to use

Vue.use(wysiwyg, {
  hideModules: { 
    headings: true,
    hyperlink: true,
    image: true,
    table: true,
    separator: true
  }
})
jonaswebdev commented 3 years ago

Hi, I have the same issue here, I'm trying to hide the "Image" button but doesn't work :(

const wysiwygOptions = {
  hideModules: {
    image: true
  },
};
Vue.use(wysiwyg, wysiwygOptions);

Some idea excepting hiding via CSS?