Bring simple editor formatting functions back to the main editor (bold, italic, underline, quote, code) so as to maintain parity and consistency with comments. Currently this will make the editor toolbar seem a bit cluttered but be aware that the second button group (attach and link tools) will be reduced to two buttons (attach and link) when the next phase of this work is completed. The third group of tools are optional features and will only be presented based on personal choice. Visual editors may need to disable, relocate, or redefine these buttons.
This commit is contained in:
@@ -118,6 +118,26 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
function inserteditortag(BBcode) {
|
||||
// allow themes to override this
|
||||
if(typeof(insertEditorFormatting) != 'undefined')
|
||||
return(insertEditorFormatting(BBcode));
|
||||
|
||||
textarea = document.getElementById('profile-jot-text');
|
||||
if (document.selection) {
|
||||
textarea.focus();
|
||||
selected = document.selection.createRange();
|
||||
selected.text = urlprefix+"["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
|
||||
} else if (textarea.selectionStart || textarea.selectionStart == "0") {
|
||||
var start = textarea.selectionStart;
|
||||
var end = textarea.selectionEnd;
|
||||
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function insertCommentURL(comment,id) {
|
||||
|
||||
reply = prompt(aStr['linkurl']);
|
||||
|
||||
Reference in New Issue
Block a user