]> git.mxchange.org Git - friendica.git/blob - view/msg-header.tpl
b1fcefd24703258c8d30132273ca1d4651c6bdbc
[friendica.git] / view / msg-header.tpl
1
2 <script language="javascript" type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
3 <script language="javascript" type="text/javascript">
4
5 var plaintext = '$editselect';
6
7 if(plaintext != 'none') {
8         tinyMCE.init({
9                 theme : "advanced",
10                 mode : "specific_textareas",
11                 editor_selector: /(profile-jot-text|prvmail-text)/,
12                 plugins : "bbcode,paste",
13                 theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
14                 theme_advanced_buttons2 : "",
15                 theme_advanced_buttons3 : "",
16                 theme_advanced_toolbar_location : "top",
17                 theme_advanced_toolbar_align : "center",
18                 theme_advanced_blockformats : "blockquote,code",
19                 paste_text_sticky : true,
20                 entity_encoding : "raw",
21                 add_unload_trigger : false,
22                 remove_linebreaks : false,
23                 force_p_newlines : false,
24                 force_br_newlines : true,
25                 forced_root_block : '',
26                 convert_urls: false,
27                 content_css: "$baseurl/view/custom_tinymce.css",
28                      //Character count
29                 theme_advanced_path : false,
30                 setup : function(ed) {
31                         ed.onInit.add(function(ed) {
32                                 ed.pasteAsPlainText = true;
33                                 var editorId = ed.editorId;
34                                 var textarea = $('#'+editorId);
35                                 if (typeof(textarea.attr('tabindex')) != "undefined") {
36                                         $('#'+editorId+'_ifr').attr('tabindex', textarea.attr('tabindex'));
37                                         textarea.attr('tabindex', null);
38                                 }
39                         });
40                 },
41         });
42 }
43
44 </script>
45 <script type="text/javascript" src="js/ajaxupload.js" ></script>
46 <script>
47         $(document).ready(function() {
48                 var uploader = new window.AjaxUpload(
49                         'prvmail-upload',
50                         { action: 'wall_upload/$nickname',
51                                 name: 'userfile',
52                                 onSubmit: function(file,ext) { $('#profile-rotator').show(); },
53                                 onComplete: function(file,response) {
54                                         tinyMCE.execCommand('mceInsertRawHTML',false,response);
55                                         $('#profile-rotator').hide();
56                                 }                                
57                         }
58                 );
59
60         });
61
62         function jotGetLink() {
63                 reply = prompt("$linkurl");
64                 if(reply && reply.length) {
65                         $('#profile-rotator').show();
66                         $.get('parse_url?url=' + reply, function(data) {
67                                 tinyMCE.execCommand('mceInsertRawHTML',false,data);
68                                 $('#profile-rotator').hide();
69                         });
70                 }
71         }
72
73         function linkdropper(event) {
74                 var linkFound = event.dataTransfer.types.contains("text/uri-list");
75                 if(linkFound)
76                         event.preventDefault();
77         }
78
79         function linkdrop(event) {
80                 var reply = event.dataTransfer.getData("text/uri-list");
81                 event.target.textContent = reply;
82                 event.preventDefault();
83                 if(reply && reply.length) {
84                         $('#profile-rotator').show();
85                         $.get('parse_url?url=' + reply, function(data) {
86                                 tinyMCE.execCommand('mceInsertRawHTML',false,data);
87                                 $('#profile-rotator').hide();
88                         });
89                 }
90         }
91
92 </script>
93