Post by DarkPikachu on Nov 19, 2013 11:40:21 GMT -8
NOTE: this plugin is still unfinished.
I'm creating this thread here in order to improve it before release.
once released, may I request this thread moved to the plugin library??
This plugin adds an auto-previewer to the BBC editor as well as the quick reply box (optional)
the previewer updates automatically when you release a key, unless you disable the auto option.
it is also extendable with other BBC plugins that can be made to support it.
and finally, if using my global keys plugin, you will see 3 extra options in your profile:
- enable quick reply preview
- enable editor preview
- enable auto-preview
bbc plugin developers:
if you'd like to extend my plugin to support your BBC,
simply do a check for the global variable, and append your BBC function to it, like so:
note, you need to supply the HTML from the post itself to your function
as your function will be called last (after general and previous BBC conversions) in my plugin.
also, if inserting the code using the JS component, make sure your plugin is initialize after mine.
otherwise, you can just put your function in the header while putting your initializer in the footer.
if your put your function in the footer, it may not always be noticed when my code tries to call it.
(I've had that happen twice already)
EDIT: a screenshot:
lh5.ggpht.com/-BORYbhztT3A/UoujjpWHexI/AAAAAAAAFso/jFj-Qo5hy6U/s1600/Screenshot%25202013-11-19%252012.41.26.png
I'm creating this thread here in order to improve it before release.
once released, may I request this thread moved to the plugin library??
This plugin adds an auto-previewer to the BBC editor as well as the quick reply box (optional)
the previewer updates automatically when you release a key, unless you disable the auto option.
it is also extendable with other BBC plugins that can be made to support it.
and finally, if using my global keys plugin, you will see 3 extra options in your profile:
- enable quick reply preview
- enable editor preview
- enable auto-preview
bbc plugin developers:
if you'd like to extend my plugin to support your BBC,
simply do a check for the global variable, and append your BBC function to it, like so:
function my_BBC_function( post_html ) {
*whatever your function does*
}
$(document).ready(function() {
try {window.previewer_extensions.push( my_BBC_function )}
catch(exc){} //preview plugin not found
//messages/signatures:
if (name.match(/(thread|conversation)|(new|quote|edit)_(thread|post|mess|conv)/)) {
$('.content .message').each(function() { $(this).html( my_BBC_function( $(this).html() ) ) });
$('.signature').each(function() { $(this).html( my_BBC_function( $(this).html() ) ) });
};
//profile signatures:
if (name.match(/user/)) {
$('.content-box.center-col:last').each(function() { $(this).html( my_BBC_function( $(this).html() ) ) });
};
});
note, you need to supply the HTML from the post itself to your function
as your function will be called last (after general and previous BBC conversions) in my plugin.
also, if inserting the code using the JS component, make sure your plugin is initialize after mine.
otherwise, you can just put your function in the header while putting your initializer in the footer.
if your put your function in the footer, it may not always be noticed when my code tries to call it.
(I've had that happen twice already)
EDIT: a screenshot:
lh5.ggpht.com/-BORYbhztT3A/UoujjpWHexI/AAAAAAAAFso/jFj-Qo5hy6U/s1600/Screenshot%25202013-11-19%252012.41.26.png