How to get tinymce typography.css styles in the dashboard?
Permalink 3 users found helpful
I'm working on a site where I'm going to be using composer for several of the page types and I'm running into a slight problem. The content needs several custom styles available in the drop down and should preview with the proper typography.css from my theme but it doesn't because it's composer.
I'm wondering what the best practice is here, or how to do this? I looked in the editor configs and inits for tinymce and I don't see anywhere that it's specified what the typography.css file should be so I don't know where it's being linked.
I'm wondering what the best practice is here, or how to do this? I looked in the editor configs and inits for tinymce and I don't see anywhere that it's specified what the typography.css file should be so I don't know where it's being linked.
I have run into the same problem, and I am glad that you solved it!
What file does this code go in?
What file does this code go in?
That was in elements/editor_config.php. It looks like the code block didn't parse correctly, that should be two blocks of code. I copied the file from /concrete/elements/editor_config.php to the outer elements folder to do the override.
Awesome! That worked perfectly. I wonder why that isn't in the core functionality?
Thanks!!!!
Thanks!!!!
Not a clue why it's not in the core, it seemed like a pretty important thing to have working for my client.
Mine too. I just hope it doesn't open unforeseen issues... I'm assuming that you haven't seen any negative repercussions since March when you first posted this?
Nobody has mentioned anything about it to us, I can't think about any way that it would interfere with anything else.
Awesome. Thanks again for the code snippet and the super fast response time!
Can you please tell me where exactly that snippets has to be inserted in the elements/editor_config.php copy?
If you haven't made any other changes to the editor_config.php file, you can try and placing the entire code block below in to a new file called editor_config.php in your elements folder.
Make sure it is in the elements folder, and not in the concrete/elements folder - that way you will have the original if things go wrong.
Also, you can use this code to see where hereNT was directing us to put the code snippets. It took me a little while to figure it out - so hopefully this will save you and maybe others some time.
-Foster
Make sure it is in the elements folder, and not in the concrete/elements folder - that way you will have the original if things go wrong.
Also, you can use this code to see where hereNT was directing us to put the code snippets. It took me a little while to figure it out - so hopefully this will save you and maybe others some time.
-Foster
<?php $textEditorHeight=intval(Config::get('CONTENTS_TXT_EDITOR_HEIGHT')); $textEditorWidth = '100%'; //else $textEditorWidth= $textEditorWidth; if($textEditorHeight<100) $textEditorHeight=380; else $textEditorHeight= $textEditorHeight-70; if (!isset($editor_selector)) { $editor_selector = 'ccm-advanced-editor'; } if (isset($editor_height)) { $textEditorHeight = $editor_height; } if (isset($editor_width)) { $textEditorWidth = $editor_width; }
Viewing 15 lines of 94 lines. View entire code block.
Thank you very much, Foster!
I can see now where the snippet has to be added, but where has the second part of the code to go?
Michael
I can see now where the snippet has to be added, but where has the second part of the code to go?
content_css : "<?php echo $theme->getThemeEditorCSS()?>",
Michael
In my editor the two snippets begin at line 24 and at line 45
The "content_css" snippet goes right after the line that starts with "convert_urls:"
The "content_css" snippet goes right after the line that starts with "convert_urls:"
Thanks so much for the quick reply, finally i figured it out, sorry for being so blind...!
Best,
Michael
Best,
Michael
I'm not sure if there's a better way to do this. It seems to me like the main editor config should do this by default so that you have the proper styles from your theme wherever you are using it.