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