Jump to content

CKEditor Custom Config Options JSON Question


Matze
 Share

Recommended Posts

Hi there,

I'd like to add some individual tags with classes directly into the edit field under Admin > Setup > Fields > MyCKfield

I can't manage the JSON thing. There is this example in Javascript: https://github.com/processwire/processwire/blob/master/site-default/modules/InputfieldCKEditor/mystyles.js
 

CKEDITOR.stylesSet.add( 'mystyles', [
{ name: 'Inline Code', element: 'code' },
{ name: 'Inline Quotation', element: 'q' },
{ name: 'Left Aligned Photo', element: 'img', attributes: { 'class': 'align_left' } },
{ name: 'Right Aligned Photo', element: 'img', attributes: { 'class': 'align_right' } },
{ name: 'Centered Photo', element: 'img', attributes: { 'class': 'align_center' } },
{ name: 'Small', element: 'small' },
{ name: 'Deleted Text', element: 'del' },
{ name: 'Inserted Text', element: 'ins' },
{ name: 'Cited Work', element: 'cite' }
]);

 

 

I need a "translation" into JSON on how to put this into the "Custom Config Options" field for the same result.
 

Thanks for your help!

 

image.png.487346b90fad0dd95e8f53fa70dd1f6a.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...