Open GoogleCodeExporter opened 8 years ago
I would also like to know how to make the B and I buttons to return different
tags,
like [b], [strong] and [i] when posting instead of , <strong> and <i>/<em>.
Original comment by bakke...@gmail.com
on 27 Feb 2010 at 7:43
yeah, I need to change the , <strong>, and <i>, ect to [b], [strong] and [i] to
integrate it to my forum
Original comment by phamluu...@gmail.com
on 1 Mar 2010 at 5:32
I found a solution by adapting the fix for replacing <BR> and <br> tags with the
proper <br /> --- see Issue 53. Here's my adapted code to get the <strong> and
<em>
tags working:
Lines 594-596 currently state:
getContent : function()
{
return $( $(this.editor).document() ).find('body').html();
Change them to this:
getContent : function()
{
var markup = $( $(this.editor).document() ).find('body').html();
return markup.replace('', '<strong>').replace('',
'</strong>').replace('<i>', '<em>').replace('</i>', '</em>').replace(/<br>/g,
'<br
/>').replace(/<BR>/g, '<br />');
},
PLEASE NOTE: If you change to the <br /> tags, you will also need to change the
math
in lines 612-616 to subtract 6 instead of 4, like so:
if ( this.options.rmUnwantedBr )
{
content = ( content.substr(-6) == '<br />' ) ? content.substr(0,
content.length - 6) : content;
}
Original comment by nsfreri...@gmail.com
on 1 Mar 2010 at 2:37
Also on lines 612-616, don't forget to change the current <br> to <br />.
Original comment by nsfreri...@gmail.com
on 1 Mar 2010 at 2:42
Unfortunately if you adopt the fix suggested by nsfrerichs and then try to edit
again the text, you won't be able to remove bold and the italic inserted before.
The quick and dirt solution I use is to replace this tags (before saving
b->strong and then again before editing strong->b) via php.
Original comment by l.biag...@gmail.com
on 17 Aug 2010 at 6:30
Original issue reported on code.google.com by
nsfreri...@gmail.com
on 25 Feb 2010 at 4:53