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