Забыли пароль?
Запросите новый здесь.

Автор темы: jikaka
ID темы: 210
Информация:
Тема содержит 13 сообщения, была просмотрена 4635 раз.
Просмотр темы
PHP-Fusion Russia » Поддержка 7 версии » Ошибки, баги
 Распечатать тему
проблема вставки текста в Tiny Mce
jikaka
ситуация такая, что при вставки любого текста из ворда
в новости или статьи или страницы вылезает разная ерунда, например вот такая фигня:

<!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:"Bookman Old Style"; panose-1:2 5 6 4 5 5 5 2 2 4; mso-font-charset:204; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:647 0 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; line-height:116%; mso-pagination:none; font-size:10.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman";} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page WordSection1 {size:612.0pt 792.0pt; margin:2.0cm 42.5pt 2.0cm 3.0cm; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.WordSection1 {page:WordSection1;} -->

вот как от этой штуки избавиться при простом копировании текста из ворда и вставке ее в область содержания...
 
Web
Alipapa
Есть же кнопочка "Вставить из Word", почему не пользуешься?
 
Web
jikaka
спасибо, было замутнение в голове
bu
 
Web
jikaka
Alipapa написал:
Есть же кнопочка "Вставить из Word", почему не пользуешься?

вот присмотрелся, нет такой кнопки у меня
получается она на последней версии есть?
 
Web
Alipapa
По рукам дать тому джентльмену, что admin_header_mce.php пишет. Там, где theme_advanced_buttons2 добавь pasteword:
...cut,copy,paste,pastetext,pasteword,|,search...
Вроде больше ничего добавлять не надо.
Изменил(а) Alipapa, 18.11.2010 10:19
 
Web
jikaka
странно, но у меня такой строки нет:
Скачать исходники  Код
function advanced() {
   tinyMCE.init({
      mode:'textareas',
      theme:'advanced',
      width:'100%',
      height:'250',
      language:'".$locale['tinymce']."',
      entities:'60,lt,62,gt',
      document_base_url:'".$settings['siteurl']."',
      relative_urls:'false',
      convert_newlines_to_brs: false,
      forced_root_block: false,
      force_br_newlines: true,
      force_p_newlines: false,
      plugins:'table,advhr,advimage,advlink,insertdatetime,searchreplace,contextmenu,ibrowser,fullscreen,pagebreak',
      pagebreak_separator : '<--PAGEBREAK-->',
      theme_advanced_buttons1_add_before:'pagebreak,separator',
      theme_advanced_buttons1_add:'fontsizeselect',
      theme_advanced_buttons2_add:'separator,insertdate,inserttime,separator,forecolor,backcolor,separator,fullscreen',
      theme_advanced_buttons3_add_before:'ibrowser,tablecontrols,separator',
      theme_advanced_buttons3_add:'advhr',
      theme_advanced_toolbar_location:'bottom',
      theme_advanced_toolbar_align:'center',
      theme_advanced_toolbar_location:'top',
      theme_advanced_statusbar_location : 'bottom',
      content_css:'".str_replace("../", "", THEME)."styles.css',
      external_image_list_url:'".str_replace("../", "", IMAGES)."imagelist.js',
      plugin_insertdate_dateFormat:'%d-%m-%Y',
      plugin_insertdate_timeFormat:'%H:%M:%S',
      invalid_elements:'script,object,applet,iframe',
      theme_advanced_resize_horizontal : true,
      theme_advanced_resizing : true,
      apply_source_formatting : true,
      convert_urls : false,
      extended_valid_elements:'a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]'
   });



 
Web
Alipapa
Ну сюда тогда попробуй:
Скачать исходники  Код
theme_advanced_buttons2_add:'separator,pasteword,insertdate,inserttime,separator,forecolor,backcolor,separator,fullscreen',


Должна появиться, правда, не рядом с кнопкой вставки, а немного правее.
Изменил(а) Alipapa, 18.11.2010 14:42
 
Web
jikaka
Alipapa, ты думаешь я не пробовал?
все-равно не появляется...
может еще где нужно прописать?
 
Web
Alipapa
Вот моя advanced() .
[php]
function advanced() {
tinyMCE.init({
// General options
mode : \"textareas\",
theme : \"advanced\",
language:\"".$locale['tinymce']."\",
plugins : \"safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,fullscreen,ibrowser\",
file_browser_callback : 'tinyBrowser',

// Theme options
theme_advanced_buttons1 : \"save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect\",
theme_advanced_buttons2 : \"cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor\",
theme_advanced_buttons3 : \"tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen\",
theme_advanced_buttons4 : \"insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,ibrowser\",
theme_advanced_toolbar_location : \"top\",
theme_advanced_toolbar_align : \"left\",
theme_advanced_statusbar_location : \"bottom\",
theme_advanced_resizing : true,

// Example content CSS (should be your site CSS)
content_css : \"".THEME."styles.css\",

// Drop lists for link/image/media/template dialogs
template_external_list_url : \"".IMAGES."tmplist.js\",
external_link_list_url : \"".IMAGES."linklist.js\",
external_image_list_url : \"".IMAGES."imagelist.js\",
media_external_list_url : \"".IMAGES."medialist.js\",

force_br_newlines : true,
force_p_newlines : false,
forced_root_block : '', // Needed for 3.x
// Replace values for the template plugin
template_replace_values : {
username : \"Some User\",
staffid : \"991234\"
}
});
}
[/php]
Просто скопировать, наверное, немного ругаться может. Сейчас номера проставятся, вв следующем посте напишу, какие строчки могут быть лишними.
 
Web
Alipapa
10, 25-29, 34-38 эти наверное совсем лишними будут. Или просто свои theme_advanced_buttons... попробуй заменить на мои, что ли. Должна же она появиться. Да, еще строчка plugins у меня длиннее, может в ней что-то подключается.
Изменил(а) Alipapa, 18.11.2010 17:43
 
Web
jikaka
создавать новый топик не буду, т.к. вопрос смежный
кто подскажет, где в тине размер текстового поля меняется?
 
Web
Alipapa
В том же admin_header_mce.php
Скачать исходники  Код
   tinyMCE.init({
      // General options
      mode : \"textareas\",
      theme : \"advanced\",
      width : '100%',
      height : '600px',

      language:\"".$locale['tinymce']."\",


Еще поле можно за угол растягивающимся сделать:
Скачать исходники  Код
theme_advanced_resizing : true,


 
Web
jikaka
ух ты!
про растягивание я не знал!
спасибо!
 
Web

Поделиться этой темой
Социальные закладки: Vkontakte Odnoklassniki Mail.ru Facebook Google Tweet This
URL:
BBcode:
HTML:

Перейти на форум: