A directory of browser-based WYSIWYG editors


Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0:
Custom Style for formatblock

The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.



Jan 25, 2005, 5:00 AM

Post #1 of 1 (2340 views)
Custom Style for formatblock Can't Post


I'm using the version of htmlarea available on webstationone. I need to add a button/dropdown option to insert/update a custom-block using a pre-defined style. It won't work to add it to the fontstyle hash because the options set in the style are only valid in a block element. (Specifically, I'm adding a "margin-left:.5in;text-indent:-.5in;" which creates proper MLA formatting for a works cited entry.) I have a class (and an ID) named works defined with this information. However, when I attempt to add a button to the btnList hash which does a surroundHTML('<p class=works>','</p>') it does not work. I have tried this editing the editor.js code directly and using the config.btnList['my-works']=[..] format. My preffered method for adding the functionality would be to add it to the formatblock dropdown, however when I edit that hash in the editor.js even by so little as changing the displayed name for a particular blockformat type, that element no longer works within the editor. Anyone who can point me in the right direction would be greatly appreciated!


Search for (options)