]> git.mxchange.org Git - friendica.git/blob - view/templates/wallmsg-header.tpl
Merge pull request #1213 from annando/1410-keyword-blacklist
[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                 gecko_spellcheck : true,
21                 paste_text_sticky : true,
22                 entity_encoding : "raw",
23                 add_unload_trigger : false,
24                 remove_linebreaks : false,
25                 //force_p_newlines : false,
26                 //force_br_newlines : true,
27                 forced_root_block : 'div',
28                 convert_urls: false,
29                 content_css: "{{$baseurl}}/view/custom_tinymce.css",
30                      //Character count
31                 theme_advanced_path : false,
32                 setup : function(ed) {
33                         ed.onInit.add(function(ed) {
34                                 ed.pasteAsPlainText = true;
35                                 var editorId = ed.editorId;
36                                 var textarea = $('#'+editorId);
37                                 if (typeof(textarea.attr('tabindex')) != "undefined") {
38                                         $('#'+editorId+'_ifr').attr('tabindex', textarea.attr('tabindex'));
39                                         textarea.attr('tabindex', null);
40                                 }
41                         });
42                 }
43         });
44 }
45 else
46         $("#prvmail-text").contact_autocomplete(baseurl+"/acl");
47
48
49 </script>
50 <script>
51
52         function jotGetLink() {
53                 reply = prompt("{{$linkurl}}");
54                 if(reply && reply.length) {
55                         $('#profile-rotator').show();
56                         $.get('parse_url?url=' + reply, function(data) {
57                                 tinyMCE.execCommand('mceInsertRawHTML',false,data);
58                                 $('#profile-rotator').hide();
59                         });
60                 }
61         }
62
63         function linkdropper(event) {
64                 var linkFound = event.dataTransfer.types.contains("text/uri-list");
65                 if(linkFound)
66                         event.preventDefault();
67         }
68
69         function linkdrop(event) {
70                 var reply = event.dataTransfer.getData("text/uri-list");
71                 event.target.textContent = reply;
72                 event.preventDefault();
73                 if(reply && reply.length) {
74                         $('#profile-rotator').show();
75                         $.get('parse_url?url=' + reply, function(data) {
76                                 tinyMCE.execCommand('mceInsertRawHTML',false,data);
77                                 $('#profile-rotator').hide();
78                         });
79                 }
80         }
81
82 </script>
83