[{"title": "Bold", "icon": "bold", "format": "bold"}, {"title": "Italic", "icon": "italic", "format": "italic"}, {"title": "Underline", "icon": "underline", "format": "underline"}, {"title": "Strikethrough", "icon": "strikethrough", "format": "strikethrough"}, {"title": "Superscript", "icon": "superscript", "format": "superscript"}, {"title": "Subscript", "icon": "subscript", "format": "subscript"}, {"title": "Code", "icon": "code", "format": "code"}]
{"title": "test", selector: "img", "classes": "imageleft"} {"title": "test", inline: "span", "classes": "imageleft"}
Key: tinymcerte.my_formats Name: setting_tinymcerte.my_formats Description: setting_tinymcerte.my_formats_desc Field Type: Textfield Namespace: tinymcerte Area Lexicon Entry: tinymcerte.style_formats Value (example): [{"title": "Title", "selector": "ul", "classes": "class"},{"title": "Title2", "selector": "li", "classes": "class2"},{ and so on}]
[{"title": "My personal styles", "items": "my_formats"},{"title": "Headers", "items": "headers_format"},{ and so on }]
Try http://modx.com/extras/package/tinymcewrapper
You won't need to do all these
[ {"title": "Dark Grey Text", "selector": "p", "classes": "grey-text"},{"title": "Small Dark Grey Text", "selector": "p", "classes": "grey-small"},{"title": "Bold Red Text", "selector": "p", "classes": "strong-red"}]
[{"title": "Custom Format", "items": "custom_format"},{"title": "Headers", "items": "headers_format"},{"title": "Inline", "items": "inline_format"},{"title": "Blocks", "items": "blocks_format"},{"title": "Alignment", "items": "alignment_format"}]
Hi there, I had a bit of trouble to start with but I've got this working now. Here are my settings.
Firstly go to System Settings, then select tinymcerte from dropdown and create a new setting with the following details
Key: tinymcerte.custom_format
Name: Custom Format
Description: (optional - I didn't use this)
Field Type: Textfield
Namespace: tinymcerte
Area Lexicon Entry: tinymcerte.style_formats
Then in the value field add the following:
[ {"title": "Dark Grey Text", "selector": "p", "classes": "grey-text"},{"title": "Small Dark Grey Text", "selector": "p", "classes": "grey-small"},{"title": "Bold Red Text", "selector": "p", "classes": "strong-red"}]
The above code provides the title for the formatting, then the tag you want to apply the formatting to ("selector" : "p") and then I've applied a class.
Next update the Style Formats to include the new Custom Format settings above.
[{"title": "Custom Format", "items": "custom_format"},{"title": "Headers", "items": "headers_format"},{"title": "Inline", "items": "inline_format"},{"title": "Blocks", "items": "blocks_format"},{"title": "Alignment", "items": "alignment_format"}]
Then clear your cache and go play with your Custom Formats....
See screenshots for more info