How to edit default jWYSIWYG tag CSS?

45 views Asked by At

Here's a nice, boring list:

  1. jWYSIWYG generates HTML tags
  2. Where does it get these default values from
  3. Can they be edited

UPDATE

With no means to edit the default values (short of creating a new custom button from scratch), the only way I found to circumvent default jWYSIWYG behaviors was in the stylesheet. This means that while the tag attributes remain, the styles can be overridden. Annoying but it works.

Hopefully this helps somebody-jWYSIWYG is a handy little plugin.

1

There are 1 answers

1
Tim Sheehan On

You can modify and create new controls with your configuration options, I'd imagine overriding existing controls would be as simple as using the same key (quote in this case).

https://github.com/akzhan/jwysiwyg#available-configuration-options

Additionally, custom controls may be specified by adding new keys with the same signature as a control object. For example, if we wish to create a quote control which creates tags, we could do specify this key:

quote: { visible: true, tags: ['blockquote'], css: { class: 'quote', className: 'quote' } 

If you want to get into the nuts and bolts of it you can always edit the source controls file https://github.com/akzhan/jwysiwyg/blob/master/src/controls/default.js - you'll need to follow the build process to rebuild afterwards.