Dec 28, 2011 at 3:37 PM
Edited Dec 29, 2011 at 10:44 AM
|
We've made two fixed to the editor for our forum software (in which the editor is included).
Youtube fix:
This prompts the user just to enter the ID for the video. Obviously, you would need to update your parser to take this into account.
Find the Youtube function and replace with:
this.InsertYoutube = function () {
// added for CalicoBB
var youtubeCode;
youtubeCode = prompt("Enter the YouTube video ID. Eg: http://youtube.com/watch?v=123, enter 123","sg60aAtYNnk");
youtubeCode = "[youtube]" + youtubeCode + "[/youtube]";
this.InsertText(youtubeCode);
}
Insert Smilie:
This allows you to insert smilies where you want.
After the Youtube fix, add:
this.InsertSmile = function (txt) {
// added for CalicoBB
this.InsertText(txt);
}
To use it, use the code
<img src="__image_url___" title=":smile:" alt=":smile:" onclick="wswgEditor.InsertSmile('__image_code__');" />
The editor is great, and so easy to use.
|