Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 445 Vote(s) - 3.49 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mybb sceditor extra fields

#1
I'm trying add extra content to mybb sceditor using three text area fields but it won't allow me to insert content.

I tried to add a function but cant get it working - help is appreciated!

$.sceditor.command.set('hidep', {
_dropDown: function (editor, caller) {
var $content;

$content = $(
'<div>' +
'<div>' +
'<label for="hidep">' + editor._('Amount of gems') + '</label> ' +
'<input type="text" id="hidep" />' +
'</div>' +
'<div>' +
'<label for="des">' + editor._('Content') + '</label> ' +
'<input type="text" id="des" />' +
'</div>' +

'<div>' +
'<label for="destitle">' + editor._('Title') + '</label> ' +
'<input type="text" id="destitle" />' +
'</div>' +

'<div><input type="button" class="button" value="' + editor._('Insert') + '" /></div>' +
'</div>'
);

$content.find('.button').on('click', function (e) {
var val = $content.find('#hidep').val(),
description = $content.find('#des').val();
descriptiontitle = $content.find('#destitle').val();
if (val) {
// needed for IE to reset the last range
$(editor).trigger('focus');

if (!editor.getRangeHelper().selectedHtml() || description) {
if (!description)
description = val;

editor.insert('
Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.
');
} else
editor.execCommand('createlink', 'mailto:' + val);
}

editor.closeDropDown(true);
e.preventDefault();
});

editor.createDropDown(caller, 'inserthidep', $content.get(0));
},
exec: function (caller) {
$.sceditor.command.get('hidep')._dropDown(this, caller);
}
});

And it should look like this!


"Good
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through