Hi Andrew and Sheaghan.
Here's one method for adding styles to the HTML editor drop-down list of paragraph styles. The style you want to add must already exist in one of your course's current theme CSS files.
Example usign Moodle 1.7 and the formal_white theme.
Let's suppose you have declared this style in one of the formal_white CSS files:
.noteImportante {
color:#FF0000; /*red*/
}
In file \moodle\lib\editor\htmlarea\htmlarea.php about line 200 you add the line marked red in the block below (do not forget the comma at the end of the previous line!)
this.formatblock = {
"":"",
"<?php echo $strheading ?> 1": "h1",
"<?php echo $strheading ?> 2": "h2",
"<?php echo $strheading ?> 3": "h3",
"<?php echo $strheading ?> 4": "h4",
"<?php echo $strheading ?> 5": "h5",
"<?php echo $strheading ?> 6": "h6",
"<?php echo $strnormal ?>": "p",
"<?php echo $straddress ?>": "address",
"<?php echo $strpreformatted ?>": "pre",
"NoteImportante": "div class=noteimportante"
};
Save file htmlarea.php. Back in your Moodle course, empty the browser cache and refresh page. Go somewhere in your course where the HTML editor is available (forum, etc.) Type some text. Click the paragraph styles dropdown list where you can see the new NoteImportante style displayed there. Click anywher in your paragraph and apply this style. Nothing happens because the HTML editor cannot display external styles (it cannot access the course's theme stylesheets). But if you click the Toggle HTML Source button you can see that the <div tag has been added:
<div class="noteimportante">Ceci est un <span style="font-style: italic;">paragraphe</span> en style NoteImportante</div>
Save your text (or post it to a forum if it's a post) and ... now you can see that your style has been applied. It works, but unfortunately is not WISIWYG in the HTML editor...
Joseph
Note.- this is a translation from a French method I posted to the French forum; sorry no time to rework the screenshots in English, I hope this will do.