Re: [fleff] Some basic questions
Hi Farnham,
2. I don't believe there's any way to modify the options in the fontsizeselect dropdown, but you could use the styleselect dropdown instead. You can supply your own CSS styles (including specific font pixel sizes) in cmsAdmin/lib/wysiwyg.css (see .exampleClass in that file) and they'll appear in a dropdown for your user. To enable styleselect, modifying a line in cmsAdmin/lib/wysiwyg.php. Change this line:
theme_advanced_buttons1 : "formatselect,fontsizeselect,bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,outdent,indent,|,removeformat,fullscreen",
to this: (new code in red)
theme_advanced_buttons1 : "formatselect,styleselect,fontsizeselect,bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,outdent,indent,|,removeformat,fullscreen",
Depending on how your client needs to generate content, this may solve your problem #1 as well. If not...
1. You can add a font dropdown to TinyMCE by modifying a line in cmsAdmin/lib/wysiwyg.php. Change this line:
theme_advanced_buttons1 : "formatselect,fontsizeselect,bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,outdent,indent,|,removeformat,fullscreen",
to this: (new code in red)
theme_advanced_buttons1 : "formatselect,fontselect,fontsizeselect,bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,outdent,indent,|,removeformat,fullscreen",
3. This is a tricky problem. One solution might be to wrap your wysiwyg output in your viewers with a classed div, then you can supply a CSS rule which targets only <P> tags in wysiwygs. For example:
<style>
.wysiwyg_content P { margin: 0; }
</style>
<div class="wysiwyg_content"><?php echo $record['content'] ?></div>
I hope this helps! Please let me know if you have any questions.
All the best,
Chris