Okay, so gecko puts in a <br> tag when you hit enter instead of <p>.
Has anyone written a plugin so that you can highlight text and insert <p></p> tags around the text, or simply insert a <p></p> tag in an blank spot? Is this even possible in gecko to begin with?
As a side note, I've tried modifying fckcodeformatter.js with a regular expression to detect double <br> tags and replace them with a <p>.
FCKCodeFormatter.Regex.BRtoP = /\<BR[^\>]\>\s*\<BR[^\>]\>/gi;
I have it placed before the RegEx's that check the opening and closing tags so after the <p> is inserted the other RegExes will close the <p> for me.
It works, except that I couldn't figure out how to find a line break and put the <p> at the beginning of a line and the </p> at the end. Therefore the first line would never be formatted into a paragraph. I tried putting in a (.*) before the <br> detection (along with a few probably wrong ways of detecting a line break) but it's too greedy and starts at the top of the page with <html> and goes all the way down to the BRs.
Any suggestions on a RegEx for this? I'm still pretty new to them and it's a miracle I got this working at all.
Has anyone written a plugin so that you can highlight text and insert <p></p> tags around the text, or simply insert a <p></p> tag in an blank spot? Is this even possible in gecko to begin with?
As a side note, I've tried modifying fckcodeformatter.js with a regular expression to detect double <br> tags and replace them with a <p>.
FCKCodeFormatter.Regex.BRtoP = /\<BR[^\>]\>\s*\<BR[^\>]\>/gi;
I have it placed before the RegEx's that check the opening and closing tags so after the <p> is inserted the other RegExes will close the <p> for me.
It works, except that I couldn't figure out how to find a line break and put the <p> at the beginning of a line and the </p> at the end. Therefore the first line would never be formatted into a paragraph. I tried putting in a (.*) before the <br> detection (along with a few probably wrong ways of detecting a line break) but it's too greedy and starts at the top of the page with <html> and goes all the way down to the BRs.
Any suggestions on a RegEx for this? I'm still pretty new to them and it's a miracle I got this working at all.