jordandelozier / wysibb

WYSIWYG BBcode editor
http://www.wysibb.com
246 stars 86 forks source link

Fails to initially set the bbcode value. #161

Open fssi opened 8 years ago

fssi commented 8 years ago

When calling $("#editor").bbcode("[b]bold[/b]"), bbcode(data) will call getHTML(data). The getHTML function should return the corresponding HTML code of the data variable (which is BBCODE), but instead, because init is undefined and therefore not true, it will incorrectly return the current HTML value of the control instead of setting it as intended.