Add to sceditor new button with this function
[hide cost="25" title="super secret content"]Pay to view this content.[/hide]
This is foundation
[hide cost="25"]Pay to view this content.[/hide]
$.[login to view URL]('hidep', {
tooltip: 'Add unlock content for gems!',
_dropDown: function (editor, caller) {
var $content;
$content = $(
'<div>' +
'<div>' +
'<label for="hidep">' + editor._('Ammount of gems') + '</label> ' +
'<input type="text" id="hidep" />' +
'</div>' +
'<div>' +
'<label for="des">' + editor._('Your hidden content') + '</label> ' +
'<input type="text" id="des" />' +
'</div>' +
'<div><input type="button" class="button" value="' + editor._('Insert') + '" /></div>' +
'</div>'
);
$[login to view URL]('.button').on('click', function (e) {
var val = $[login to view URL]('#hidep').val(),
description = $[login to view URL]('#des').val();
if (val) {
// needed for IE to reset the last range
$(editor).trigger('focus');
if (![login to view URL]().selectedHtml() || description) {
if (!description)
description = val;
[login to view URL]('[hide cost="' + val + '"]' + description + '[/hide]');
} else
[login to view URL]('createlink', 'mailto:' + val);
}
[login to view URL](true);
[login to view URL]();
});
[login to view URL](caller, 'inserthidep', $[login to view URL](0));
},
exec: function (caller) {
$.[login to view URL]('hidep')._dropDown(this, caller);
}
});