rapidpro / chpro-microsite

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Add .lead & .stat to style drop down on WYSIWYG #40

Open mtrythall opened 6 years ago

mtrythall commented 6 years ago

We need a way to apply the lead style to the WYSIWYG.

mtrythall commented 6 years ago

Maybe @sodevious can help with this one.

We need to add these classes to the style drop down on CKEditor:

https://docs.ckeditor.com/ckeditor4/latest/guide/dev_howtos_styles.html#how-do-i-customize-the-styles-drop-down-list

We can use this file:

https://github.com/rapidpro/chpro-microsite/blob/custom-ckeditor/rh/client/static/admin/extensions.js#L19-L26 (note this is in the custom-ckeditor branch).

Unfortunately, it doesn't immediately work.

mtrythall commented 6 years ago

Spoke with @nicolaslara about this one and going to try setting this up via base.py.

mtrythall commented 6 years ago

I've since learned that you can't append here, you have to overwrite. So, that's what we'll do.

Could be wrong, but haven't see any other examples.

mtrythall commented 6 years ago

We're using django-ckeditor: https://github.com/django-ckeditor/django-ckeditor

jessiofhall commented 6 years ago

@sodevious and @mtrythall what's happening with this issue? Do we need to complete or add it back to the backlog?

mtrythall commented 6 years ago

Ack, we never got around to it. I don't think it's blocking anyone, it's a nice to have. Basically, there's a drop down in the WYSIWYG editor to apply some common styles. It'd be nice to have that drop down work with our styles (instead of the defaults), but it doesn't currently.

You can still apply the styles via the code editor on the WYSIWYG, but that's not as user friendly.

I still think it'd be great to have, but couldn't figure it out immediately without throwing out a bunch of existing WYSIWYG config.

jessiofhall commented 6 years ago

Should we move it back to the backlog? Was this a request or something you noticed?

mtrythall commented 6 years ago

Something I noticed/We do on most Django CMS efforts.