| ... | ... |
@@ -36,6 +36,7 @@ echo " |
| 36 | 36 |
relative_urls: false, |
| 37 | 37 |
remove_script_host: false, |
| 38 | 38 |
convert_urls: true, |
| 39 |
+ entity_encoding: 'raw', |
|
| 39 | 40 |
paste_word_valid_elements: 'b,strong,i,em,h1,h2,u,p,ol,ul,li,a[href],span,color,font-size,font-color,font-family,mark,table,tr,td', |
| 40 | 41 |
toolbar1: 'bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist | undo redo | fullscreen code | link unlink | emoticons image anchor hr ', image_advtab: true, |
| 41 | 42 |
paste_word_valid_elements: 'b,strong,i,em,p,span,u,strike,br', |
| ... | ... |
@@ -49,7 +49,7 @@ echo " |
| 49 | 49 |
tools: { title: 'Tools', items: '' }
|
| 50 | 50 |
},"; |
| 51 | 51 |
if (USERUID && $image_list_exists) |
| 52 |
- echo " image_list: tinyMCE4ImageList ,"; |
|
| 52 |
+ echo " image_list: tinyMCENewImageList ,"; |
|
| 53 | 53 |
echo " |
| 54 | 54 |
theme_modern_resizing: true,".($current == "adminarea" ? "\n\t\tentity_encoding: 'raw'" : "\n\t\tinvalid_elements: 'script,object,applet,iframe'")." |
| 55 | 55 |
}); |
| ... | ... |
@@ -1,11 +1,11 @@ |
| 1 | 1 |
<?php |
| 2 |
-$image_list_path = STORIESPATH . "/" . USERUID . "../images/imagelist.js"; |
|
| 2 |
+$image_list_path = STORIESPATH . "/" . USERUID . "/images/imagelist.js"; |
|
| 3 | 3 |
$image_list_exists = file_exists($image_list_path); |
| 4 | 4 |
|
| 5 | 5 |
if (USERUID && $image_list_exists) |
| 6 | 6 |
{
|
| 7 | 7 |
echo " |
| 8 |
-<script src='".STORIESPATH . "/" . USERUID . "../images/imagelist.js"."'></script>"; |
|
| 8 |
+<script src='".STORIESPATH . "/" . USERUID . "/images/imagelist.js"."'></script>"; |
|
| 9 | 9 |
} |
| 10 | 10 |
echo " |
| 11 | 11 |
<script language=\"javascript\" type=\"text/javascript\"><!--"; |
| ... | ... |
@@ -30,8 +30,8 @@ echo " |
| 30 | 30 |
invalid_styles: 'color,font-size,margin,line-height,font-family,margin-top,margin-bottom', |
| 31 | 31 |
plugins: 'wordcount emoticons fullscreen anchor code hr image link paste ', |
| 32 | 32 |
skin: 'lightgray', |
| 33 |
- min_height: 250, |
|
| 34 |
- width: 440, |
|
| 33 |
+ height: 300, |
|
| 34 |
+ width: 580, |
|
| 35 | 35 |
browser_spellcheck: true, |
| 36 | 36 |
relative_urls: false, |
| 37 | 37 |
remove_script_host: false, |
| ... | ... |
@@ -53,7 +53,7 @@ echo " |
| 53 | 53 |
echo " |
| 54 | 54 |
theme_modern_resizing: true,".($current == "adminarea" ? "\n\t\tentity_encoding: 'raw'" : "\n\t\tinvalid_elements: 'script,object,applet,iframe'")." |
| 55 | 55 |
}); |
| 56 |
- |
|
| 56 |
+ |
|
| 57 | 57 |
"; |
| 58 | 58 |
} |
| 59 | 59 |
echo " |
| ... | ... |
@@ -63,21 +63,8 @@ var tinyMCEmode = true; |
| 63 | 63 |
|
| 64 | 64 |
if (tinyMCE.get(id) == null) |
| 65 | 65 |
tinymce.EditorManager.execCommand('mceAddEditor',true, id);
|
| 66 |
- //tinyMCE.execCommand('mceAddControl', false, id);
|
|
| 67 | 66 |
else |
| 68 | 67 |
tinymce.EditorManager.execCommand('mceRemoveEditor', true, id);
|
| 69 |
- // tinyMCE.execCommand('mceRemoveControl', false, id);
|
|
| 70 | 68 |
} |
| 71 | 69 |
"; |
| 72 |
-/*echo " |
|
| 73 |
-var tinyMCEmode = true; |
|
| 74 |
- function toogleEditorMode(id) {
|
|
| 75 |
- var elm = document.getElementById(id); |
|
| 76 |
- |
|
| 77 |
- if (tinyMCE.get(id) == null) |
|
| 78 |
- tinyMCE.execCommand('mceAddControl', false, id);
|
|
| 79 |
- else |
|
| 80 |
- tinyMCE.execCommand('mceRemoveControl', false, id);
|
|
| 81 |
- } |
|
| 82 |
-";*/ |
|
| 83 | 70 |
echo " --></script>"; |
| ... | ... |
@@ -1,11 +1,11 @@ |
| 1 | 1 |
<?php |
| 2 |
-$image_list_path = STORIESPATH . "/" . USERUID . "/images/imagelist.js"; |
|
| 2 |
+$image_list_path = STORIESPATH . "/" . USERUID . "../images/imagelist.js"; |
|
| 3 | 3 |
$image_list_exists = file_exists($image_list_path); |
| 4 | 4 |
|
| 5 | 5 |
if (USERUID && $image_list_exists) |
| 6 | 6 |
{
|
| 7 | 7 |
echo " |
| 8 |
-<script src='".STORIESPATH . "/" . USERUID . "/images/imagelist.js"."'></script>"; |
|
| 8 |
+<script src='".STORIESPATH . "/" . USERUID . "../images/imagelist.js"."'></script>"; |
|
| 9 | 9 |
} |
| 10 | 10 |
echo " |
| 11 | 11 |
<script language=\"javascript\" type=\"text/javascript\"><!--"; |
| ... | ... |
@@ -23,13 +23,15 @@ echo " |
| 23 | 23 |
echo " |
| 24 | 24 |
tinymce.init({
|
| 25 | 25 |
selector: 'textarea:not(.mceNoEditor)', |
| 26 |
+ resize: 'both', |
|
| 26 | 27 |
menubar: false, |
| 27 | 28 |
language: '$tinylanguage', |
| 28 | 29 |
theme: 'modern', |
| 29 | 30 |
invalid_styles: 'color,font-size,margin,line-height,font-family,margin-top,margin-bottom', |
| 30 | 31 |
plugins: 'wordcount emoticons fullscreen anchor code hr image link paste ', |
| 31 | 32 |
skin: 'lightgray', |
| 32 |
- min_height: 200, |
|
| 33 |
+ min_height: 250, |
|
| 34 |
+ width: 440, |
|
| 33 | 35 |
browser_spellcheck: true, |
| 34 | 36 |
relative_urls: false, |
| 35 | 37 |
remove_script_host: false, |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,81 @@ |
| 1 |
+<?php |
|
| 2 |
+$image_list_path = STORIESPATH . "/" . USERUID . "/images/imagelist.js"; |
|
| 3 |
+$image_list_exists = file_exists($image_list_path); |
|
| 4 |
+ |
|
| 5 |
+if (USERUID && $image_list_exists) |
|
| 6 |
+{
|
|
| 7 |
+echo " |
|
| 8 |
+<script src='".STORIESPATH . "/" . USERUID . "/images/imagelist.js"."'></script>"; |
|
| 9 |
+} |
|
| 10 |
+echo " |
|
| 11 |
+ <script language=\"javascript\" type=\"text/javascript\"><!--"; |
|
| 12 |
+ $tinylanguage = $language; |
|
| 13 |
+ if (!file_exists(_BASEDIR . "tinymce/4/js/tinymce/langs/{$language}.js"))
|
|
| 14 |
+ {
|
|
| 15 |
+ $tinylanguage = "en"; |
|
| 16 |
+ } |
|
| 17 |
+ $tinymessage = dbquery("SELECT message_text FROM ".TABLEPREFIX."fanfiction_messages WHERE message_name = 'tinyMCE' LIMIT 1");
|
|
| 18 |
+ list($tinysettings) = dbrow($tinymessage); |
|
| 19 |
+ if(!empty($tinysettings) && $current != "adminarea") {
|
|
| 20 |
+ echo $tinysettings; |
|
| 21 |
+ } |
|
| 22 |
+ else {
|
|
| 23 |
+ echo " |
|
| 24 |
+ tinymce.init({
|
|
| 25 |
+ selector: 'textarea:not(.mceNoEditor)', |
|
| 26 |
+ menubar: false, |
|
| 27 |
+ language: '$tinylanguage', |
|
| 28 |
+ theme: 'modern', |
|
| 29 |
+ invalid_styles: 'color,font-size,margin,line-height,font-family,margin-top,margin-bottom', |
|
| 30 |
+ plugins: 'wordcount emoticons fullscreen anchor code hr image link paste ', |
|
| 31 |
+ skin: 'lightgray', |
|
| 32 |
+ min_height: 200, |
|
| 33 |
+ browser_spellcheck: true, |
|
| 34 |
+ relative_urls: false, |
|
| 35 |
+ remove_script_host: false, |
|
| 36 |
+ convert_urls: true, |
|
| 37 |
+ paste_word_valid_elements: 'b,strong,i,em,h1,h2,u,p,ol,ul,li,a[href],span,color,font-size,font-color,font-family,mark,table,tr,td', |
|
| 38 |
+ toolbar1: 'bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist | undo redo | fullscreen code | link unlink | emoticons image anchor hr ', image_advtab: true, |
|
| 39 |
+ paste_word_valid_elements: 'b,strong,i,em,p,span,u,strike,br', |
|
| 40 |
+ paste_retain_style_properties: 'text-decoration,text-align', |
|
| 41 |
+ menu: {
|
|
| 42 |
+ file: { title: 'File', items: 'newdocument' },
|
|
| 43 |
+ edit: { title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall' },
|
|
| 44 |
+ insert: { title: 'Insert', items: 'link media | template hr' },
|
|
| 45 |
+ view: { title: 'View', items: 'visualaid' },
|
|
| 46 |
+ table: { title: 'Table', items: 'inserttable tableprops deletetable | cell row column' },
|
|
| 47 |
+ tools: { title: 'Tools', items: '' }
|
|
| 48 |
+ },"; |
|
| 49 |
+ if (USERUID && $image_list_exists) |
|
| 50 |
+ echo " image_list: tinyMCE4ImageList ,"; |
|
| 51 |
+ echo " |
|
| 52 |
+ theme_modern_resizing: true,".($current == "adminarea" ? "\n\t\tentity_encoding: 'raw'" : "\n\t\tinvalid_elements: 'script,object,applet,iframe'")." |
|
| 53 |
+ }); |
|
| 54 |
+ |
|
| 55 |
+"; |
|
| 56 |
+ } |
|
| 57 |
+ echo " |
|
| 58 |
+var tinyMCEmode = true; |
|
| 59 |
+ function toogleEditorMode(id) {
|
|
| 60 |
+ var elm = document.getElementById(id); |
|
| 61 |
+ |
|
| 62 |
+ if (tinyMCE.get(id) == null) |
|
| 63 |
+ tinymce.EditorManager.execCommand('mceAddEditor',true, id);
|
|
| 64 |
+ //tinyMCE.execCommand('mceAddControl', false, id);
|
|
| 65 |
+ else |
|
| 66 |
+ tinymce.EditorManager.execCommand('mceRemoveEditor', true, id);
|
|
| 67 |
+ // tinyMCE.execCommand('mceRemoveControl', false, id);
|
|
| 68 |
+ } |
|
| 69 |
+"; |
|
| 70 |
+/*echo " |
|
| 71 |
+var tinyMCEmode = true; |
|
| 72 |
+ function toogleEditorMode(id) {
|
|
| 73 |
+ var elm = document.getElementById(id); |
|
| 74 |
+ |
|
| 75 |
+ if (tinyMCE.get(id) == null) |
|
| 76 |
+ tinyMCE.execCommand('mceAddControl', false, id);
|
|
| 77 |
+ else |
|
| 78 |
+ tinyMCE.execCommand('mceRemoveControl', false, id);
|
|
| 79 |
+ } |
|
| 80 |
+";*/ |
|
| 81 |
+echo " --></script>"; |