- var editorData = {
- mode : "specific_textareas",
- editor_selector : "prvmail-text",
- //plugins : "bbcode,paste",
- //paste_text_sticky : true,
- convert_urls : false,
- //theme_advanced_path : false,
- setup : function(ed) {
- cPopup = null;
- ed.onKeyDown.add(function(ed,e) {
- if (cPopup !== null)
- cPopup.onkey(e);
- });
-
- ed.onKeyUp.add(function(ed, e) {
- var txt = tinyMCE.activeEditor.getContent();
- match = txt.match(/@([^ \n]+)$/);
- if (match!==null) {
- if (cPopup === null) {
- cPopup = new ACPopup(this,baseurl+"/acl");
- }
- if (cPopup.ready && match[1]!==cPopup.searchText) cPopup.search(match[1]);
- if (! cPopup.ready) cPopup = null;
- }
- else {
- if (cPopup !== null) { cPopup.close(); cPopup = null; }
- }
-
- textlen = txt.length;
- if (textlen != 0 && $('#jot-perms-icon').is('.unlock')) {
- $('#profile-jot-desc').html(window.isPublic);
- }
- else {
- $('#profile-jot-desc').html(' ');
- }
- });
-
- ed.onInit.add(function(ed) {
- ed.pasteAsPlainText = true;
- var editorId = ed.editorId;
- var textarea = $('#'+editorId);
- if (typeof(textarea.attr('tabindex')) != "undefined") {
- $('#'+editorId+'_ifr').attr('tabindex', textarea.attr('tabindex'));
- textarea.attr('tabindex', null);
- }
- });
- },
- plaintextFn : function() {
- $("#prvmail-text").editor_autocomplete(baseurl+"/acl");
- }
- }
- InitMCEEditor(editorData);
-}
-
-
-function contactInitEditor() {
- var editorData = {
- mode : "exact",
- elements : "contact-edit-info",
- //plugins : "bbcode"
- }
- InitMCEEditor(editorData);
-}
-
-
-function eventInitEditor() {
- var editorData = {
- mode : "textareas",
- //plugins : "bbcode,paste",
- //paste_text_sticky : true,
- //theme_advanced_path : false,
- setup : function(ed) {
- ed.onInit.add(function(ed) {
- ed.pasteAsPlainText = true;
- });
- }
- }
- InitMCEEditor(editorData);
-}
-
-
-function profInitEditor() {
- var editorData = {
- mode : "textareas",
- //plugins : "bbcode,paste",
- //paste_text_sticky : true,
- //theme_advanced_path : false,
- setup : function(ed) {
- ed.onInit.add(function(ed) {
- ed.pasteAsPlainText = true;
- });
- }
- }
- InitMCEEditor(editorData);