var rule={ title:"Horizontal1 Rule Shortcode", id :'oscitas-form-rule', pluginName: 'rule' }; (function() { _create_tinyMCE_options(rule); })(); function ebs_return_html_rule(pluginObj){ var form = jQuery('
\ \ \ \ \ \ \ \ \ \ \ \ \

\

\ '+ebsjstrans.enternumvaleg20+'\

\
\

\ \

\ \
'); return form; } function create_oscitas_rule(pluginObj){ var form = jQuery(pluginObj.hashId); var table = form.find('table'); //form.appendTo('body').hide(); // handles the click event of the submit button form.find('#oscitas-rule-submit').click(function() { // defines the options and their default values // again, this is not the most elegant way to do this // but well, this gets the job done nonetheless var cusclass='',margin=''; if(table.find('#oscitas-rule-class').val()!=''){ cusclass= ' class="'+table.find('#oscitas-rule-class').val()+'"'; } if(table.find('#oscitas-rule-margin').val()!=''){ margin= ' margin="'+table.find('#oscitas-rule-margin').val()+'"'; } var shortcode = '[rule'+cusclass+margin; shortcode += ' style="' + table.find('#oscitas-rule-style').val(); shortcode += '" '; //shortcode += ' btntag="'+table.find('#oscitas-button-type').val()+'" '; shortcode += ']'; // inserts the shortcode into the active editor ebsInsertShortcode(shortcode); // closes Dialoguebox close_dialogue(pluginObj.hashId); }); }