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