anbuashokcs / jforum2

Automatically exported from code.google.com/p/jforum2
Other
0 stars 0 forks source link

Editing color or font size do not work #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
BBcode is not added to the text any more.

I would expect the text to be put inside bbcode for color and font.

I tried v2.3.5

Original issue reported on code.google.com by ronny.na...@gmail.com on 22 Feb 2014 at 3:18

GoogleCodeExporter commented 9 years ago
1.templates/default/js/post.js has defined a bbtags array for bbcode tags. 
So each tag's array index is equal to the number behind the form element's name 
prefixed by 'addbbcode'. 
For example: [b] is addbbcode0, and [i] is addbbcode2. 
2.color and font are not defined in bbtags. so their index should be after the 
last bbtags index.
3.Fix:
The post_form.htm should be modified as follows:
<select onmouseover="helpline('s')" onchange="bbfontstyle('[color=' + 
this.form.addbbcode30.options[this.form.addbbcode30.selectedIndex].value + ']', 
'[/color]')" name="addbbcode30">
 <select onmouseover="helpline('f')" onchange="bbfontstyle('[size=' + this.form.addbbcode32.options[this.form.addbbcode32.selectedIndex].value + ']', '[/size]')" name="addbbcode32">

Original comment by andow...@gmail.com on 22 Feb 2014 at 5:03

GoogleCodeExporter commented 9 years ago
Nice. 

Also you might want to check the following as it is an error in 2.1.8. 

If you set a color to some text. The color selector stays on that color. If you 
want to add the same color to other text you have to first give it another 
color then change the colortext manually. 

I do not know if this is a problem in 2.3.5 since setting the color do not work.

I am really happy to see that jforum continous to live. Good work :-)

Original comment by ronny.na...@gmail.com on 22 Feb 2014 at 5:07

GoogleCodeExporter commented 9 years ago
If you change onchange to onblur, you will get what you want.
onblur="bbfontstyle('[color=' + 
this.form.addbbcode30.options[this.form.addbbcode30.selectedIndex].value + ']', 
'[/color]')"
However, you will need to click back the textarea, and then onblur() starts to 
trigger the bbcode style. The response time is not as good as onchange. 

Original comment by andow...@gmail.com on 23 Feb 2014 at 6:26

GoogleCodeExporter commented 9 years ago
commit in [r328]

Original comment by andow...@gmail.com on 28 Jun 2014 at 2:33