Feature Request: Restore ability to have custom styles show in FogBugz 8 wiki editor menus - FogBugz Knowledge Exchange most recent 30 from http://fogbugz.stackexchange.com2013-06-19T20:09:24Zhttp://fogbugz.stackexchange.com/feeds/question/4464http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://fogbugz.stackexchange.com/questions/4464/feature-request-restore-ability-to-have-custom-styles-show-in-fogbugz-8-wiki-ediFeature Request: Restore ability to have custom styles show in FogBugz 8 wiki editor menusjasonjwwilliams2010-09-08T19:38:09Z2012-03-06T20:04:47Z
<p>Hi,</p>
<p>After upgrading to the FB8 beta, I converted our wiki template and CSS to the FB8 style. However, my custom styles in the CSS no longer show up in the editor under Format. How can I get these back?</p>
<p>Interestingly, documents relying on them still render the styles fine.</p>
<blockquote>
<p><img src="http://www.gravatar.com/avatar/baf927dcc0b0c5d0f41dece1e575aa0f?s=32&d=identicon&r=PG" alt="Fog Creek"> <a href="http://fogbugz.stackexchange.com/questions/1023/whats-that-kiwi-logo-and-case-number-at-the-bottom-of-my-feature-request" rel="nofollow">Case FC1954367</a></p>
</blockquote>
http://fogbugz.stackexchange.com/questions/4464/feature-request-restore-ability-to-have-custom-styles-show-in-fogbugz-8-wiki-edi/4495#4495Answer by db for Feature Request: Restore ability to have custom styles show in FogBugz 8 wiki editor menusdb2010-09-09T14:32:55Z2011-04-20T21:25:41Z<p><strong>Short answer:</strong> FogBugz 8 no longer supports the ability to add custom entries to the Format, Font Family, and Font Size dropdowns in the wiki editor.</p>
<p><strong>Longer answer:</strong> One of the biggest goals of FogBugz 8 was to give our customers a much-improved wiki experience. As part of that effort, we replaced our own bug-riddled wiki editor with a customized version of <a href="http://ckeditor.com/demo" rel="nofollow">CKEditor</a>.</p>
<p>Switching to CKEditor has not only eliminated the vast majority of browser bugs our customers had to deal with in FogBugz 7 and earlier, but has also enabled our customers to edit their wiki pages' HTML source directly (if they so desire). This has been a long-standing feature request and gives our customers a great deal of power when it comes to editing their wiki documents.</p>
<p>An additional benefit of moving toward a third party wiki editor is the ease with which we can apply updates to it as the CKEditor team updates their editor to support new browser features and fixes bugs. We have customized CKEditor in a number of ways in order for it to integrate more seamlessly with FogBugz; however, the more we customize it, the more difficult it becomes for us to apply updates to CKEditor that come from the CKEditor team. Custom fonts and formatting styles is one place where we have decided not to customize CKEditor.</p>
<p>The decision to lose support for custom formatting options in the wiki editor was not made lightly. This is why documents relying on these custom styles continue to look the way they did in FogBugz 7: we made sure to carry forward the custom font, size, and format styles into the new FogBugz 8 default template.</p>
<p><strong>Workaround:</strong> The workaround for custom format styles (e.g., <code>p.ExtraPadding {padding: 25px;}</code>), is to edit the HTML source of your wiki article and manually add the necessary <code>class</code> attributes (e.g., add <code>class="ExtraPadding"</code> attribute to the <code><p></code> tag). If you look at the answer below this one, you'll also see there is another workaround involving editing the CKEditor configuration to put your custom style back in.</p>
http://fogbugz.stackexchange.com/questions/4464/feature-request-restore-ability-to-have-custom-styles-show-in-fogbugz-8-wiki-edi/4665#4665Answer by DaveJ for Feature Request: Restore ability to have custom styles show in FogBugz 8 wiki editor menusDaveJ2010-09-16T17:53:08Z2010-09-16T17:53:08Z<p>Sorry for the question post - I'm a new user so I don't have enough rep to leave a comment - </p>
<p>This is absolutely ridiculous that you are actually REMOVING features! </p>
<p>The custom styles was the only thing that made the FB7 wiki usable. CKEditor definitely handles styles so I'm not sure your excuse that you don't want to modify it too much makes sense.</p>
http://fogbugz.stackexchange.com/questions/4464/feature-request-restore-ability-to-have-custom-styles-show-in-fogbugz-8-wiki-edi/6827#6827Answer by timor for Feature Request: Restore ability to have custom styles show in FogBugz 8 wiki editor menustimor2011-02-01T10:45:35Z2011-02-01T10:45:35Z<p>We have another problem with removing the custom paragraph classes. We relied on it not only for formatting, but also for content flagging. There were sections which could <em>easily</em> be marked as an open questtion, and then a very simple script would collect these kinds of different paragrapgs, just to give an idea. I don't see an alternative way to implement this now.</p>
http://fogbugz.stackexchange.com/questions/4464/feature-request-restore-ability-to-have-custom-styles-show-in-fogbugz-8-wiki-edi/7945#7945Answer by DavidF for Feature Request: Restore ability to have custom styles show in FogBugz 8 wiki editor menusDavidF2011-04-20T20:57:19Z2011-04-20T20:57:19Z<p>For those who are running a stand-alone FogBugz 8 server the solution is quite simple:
Configure CKEditor to your needs.</p>
<p>In the Website/ckeditor/config.js file I added the following, <em>before</em> the Formats are set up:</p>
<pre><code>config.format_warning = { element : 'p' , attributes : { 'class' : 'Warning_Comment' } };
config.format_section_heading = { element : 'h2', attributes : { 'class' : 'Section_Heading' } };
config.format_user_comment = { element : 'p' , attributes : { 'class' : 'User_Comment' } };
config.format_info = { element : 'p' , attributes : { 'class' : 'Info_Comment' } };
config.format_divider = { element : 'p' , attributes : { 'class' : 'Divider' } };
config.format_tags = 'p;pre;user_comment;info;warning;divider;h1;h2;section_heading;h3;h4;h5;h6';
</code></pre>
<p>Then you need to add the names of those Formats with a "tag_" prefix to the appropriate language files in ckeditor/lang/*.js,
search for "tag_" and insert something like the following at that point (it wont work if you simply insert them at the beginning of the map):</p>
<pre><code>,tag_warning:'Warning',tag_section_heading:'Section Heading',tag_user_comment:'User Comment',tag_info:'Info Comment',tag_divider:'Divider',tag_p:'Normal'
</code></pre>
<p>Now I have my custom styles back :-)</p>