Topic: Support/Comments for TinyMCE  (Read 105200 times)

Pages: [1] 2 3 ... 19   Go Down

#1: 26-Jun-2006, 03:58 PM

Moderator

Bravado
Posts: 1,108

"I can learn to resist anything but temptation..."

WWW
This is an auto-generated support/comment thread for TinyMCE.

Use this forum to post any comments about this addition or any questions you have regarding its use.

Brief Description:
Adds the TinyMCE richtext editor to MODx.
« Last Edit: 3-Jul-2006, 05:58 PM by garryn »
Jeff Whitfield

"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"

-George Carlin

#2: 10-Jul-2006, 11:23 AM

Duane
Posts: 51

I have a series of product pages where the product is shown as a thumbnail and uses lightbox-plus to open a larger view.

Whenever I do any editing on this page, the lightbox effect disappears, and after some experimenting I have determined it's because MCE is stripping the rel="lightbox" call out of the <a> tag.

If I try to re-insert the rel="lightbox" in the HTML code view of MCE, it doesn't save it. In fact, the only way I can get the rel="lightbox" back into the <a> tag is to manually insert it into the database with PHP MyAdmin.

Why is this happening? Is there some setting that strips tag properties not generated by the image insertion function?

I can't find anything about this at MoxieCode, so I was hoping someone here would know.

Thanks,
Duane

#3: 11-Jul-2006, 07:09 AM

Coding Team

doze
Posts: 4,105

....Boom!

Maybe need to edit the valid_elemets configuration setting to allow rel attribute in link tags. But I'm sure you can save the rel attribute from manager if you just disable the editor for that document (in the "page settings" tab, "rich text" checkbox).
New MODx wiki! Please help up with documentation efforts! || Old Wiki

"He can have a lollipop any time he wants to. That's what it means to be a programmer."

#4: 11-Jul-2006, 10:35 AM

Moderator

Bravado
Posts: 1,108

"I can learn to resist anything but temptation..."

WWW
Doze, you pretty much have it right on the money.  However, rather than using the valid_elements config setting, I think the extended_valid_elements config setting should be used instead.  If you look at the plugin code, you'll see a line like this:

Code:
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",

It's pretty easy to figure out what's what on this line.  To add support for the "rel" attribute for "a" tags, you could simply add in the "rel" attribute to the the part of the line dealing with anchor tags (a[name|href|target|title|onclick|rel]).  Just modify the code like that and you should be set.

Probably what I'll do for the next revision is add in the valid_elements config setting to where just about every valid element in the XHTML specification is covered.  That way we won't have a bunch of elements constantly being replaced on users.

More to come....

Jeff
Jeff Whitfield

"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"

-George Carlin

#5: 11-Jul-2006, 01:44 PM

Duane
Posts: 51

Doze, you pretty much have it right on the money.  However, rather than using the valid_elements config setting, I think the extended_valid_elements config setting should be used instead.  If you look at the plugin code, you'll see a line like this:

Code:
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",

It's pretty easy to figure out what's what on this line.  To add support for the "rel" attribute for "a" tags, you could simply add in the "rel" attribute to the the part of the line dealing with anchor tags (a[name|href|target|title|onclick|rel]).  Just modify the code like that and you should be set.

Probably what I'll do for the next revision is add in the valid_elements config setting to where just about every valid element in the XHTML specification is covered.  That way we won't have a bunch of elements constantly being replaced on users.

More to come....

Jeff

This worked perfectly! Thank you.

Duane

#6: 13-Jul-2006, 03:54 AM

Moderators
yama
Posts: 935

MODx研究中

WWW
http://modxcms.com/forums/index.php/topic,4910.0.html
Japanese lang files is here.

If this file doesn't exist, the following errors might be displayed. (at japanese-euc)

#7: 13-Jul-2006, 08:59 AM

Moderator

Bravado
Posts: 1,108

"I can learn to resist anything but temptation..."

WWW
One step ahead of ya, Yama!  I've added the Japanese language file.  I just need to test it right quick and update the current version in the repository.  Smiley
Jeff Whitfield

"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"

-George Carlin

#8: 13-Jul-2006, 03:45 PM

Marschant
Posts: 133

Last night I upgraded to tinymce 2.0.6.1 from 2.0.4 and now the element path is no longer working, here's my init call:

Code:
$fullScript = <<<FULL_SCRIPT
<script language="javascript" type="text/javascript" src="{$base_url}assets/plugins/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
  theme : "advanced",
  mode : "exact",
  relative_urls : {$relative_urls}, {$document_base_url}
  remove_script_host : {$remove_script_host},
  language : "{$tinymce_language}",
  nowrap : false,
                  object_resizing : false,
                  fix_content_duplication : true,
                  force_p_newlines : false,
                  force_br_newlines : false,
                  remove_linebreaks : false,
                  apply_source_formatting : false,
                  fix_list_elements : true,
  $elmList
  $webWidth
  $webHeight
  plugins : "style,layer,table,advhr,advimage,advlink,insertdatetime,preview,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable",
  theme_advanced_buttons1_add_before : "separator,save,newdocument,separator",
  theme_advanced_buttons1_add : "",
  theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor",
  theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator,pastetext,pasteword,selectall,separator",
  theme_advanced_buttons3_add_before: "tablecontrols,separator",
  theme_advanced_buttons3_add : "iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
  theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops",
  theme_advanced_toolbar_location : "bottom",
  theme_advanced_toolbar_align : "left",
  theme_advanced_path_location : "top",
                  theme_advanced_source_editor_width : "768",
                  theme_advanced_source_editor_height : "576",
                  theme_advanced_source_editor_wrap : true,
  plugin_insertdate_dateFormat : "%Y-%m-%d",
  plugin_insertdate_timeFormat : "%H:%M:%S",
  extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
  $cssPath
  $cssSelector
  onchange_callback : "tvOnTinyMCEChangeCallBack",
  resource_browser_path : "{$base_url}manager/media/browser/mcpuk/browser.html?Connector={$base_url}manager/media/browser/mcpuk/connectors/php/connector.php&ServerPath={$base_url}",
  $fileBrowserCallback
   });

Anybody else experienced this or know of a way to correct this?

#9: 14-Jul-2006, 08:29 AM

Moderator

Bravado
Posts: 1,108

"I can learn to resist anything but temptation..."

WWW
Element path?  I'm not sure what you mean.  Could you post the HTML code from an instance of TinyMCE after rendering?  The code might look like this:

Code:
<script language="javascript" type="text/javascript" src="/assets/plugins/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
  theme : "advanced",
  mode : "exact",
  relative_urls : true,
  document_base_url : "/",
  remove_script_host : true,
  language : "en",
  elements : "ta,tvhi_sidebar",
 
 
  plugins : "style,layer,table,advhr,advimage,advlink,emotions,insertdatetime,preview,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable",
  theme_advanced_buttons1_add_before : "save,newdocument,separator",
  theme_advanced_buttons1_add : "fontselect,fontsizeselect",
  theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor",
  theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator,pastetext,pasteword,selectall,separator",
  theme_advanced_buttons3_add_before: "tablecontrols,separator",
  theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
  theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops",
  theme_advanced_toolbar_location : "top",
  theme_advanced_toolbar_align : "left",
  theme_advanced_path_location : "bottom",
  plugin_insertdate_dateFormat : "%Y-%m-%d",
  plugin_insertdate_timeFormat : "%H:%M:%S",
  extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
 
 
  preformatted : true,
  onchange_callback : "tvOnTinyMCEChangeCallBack",
  resource_browser_path : "/manager/media/browser/mcpuk/browser.html?Connector=/manager/media/browser/mcpuk/connectors/php/connector.php&ServerPath=/",
  file_browser_callback : "fileBrowserCallBack"
   });

function fileBrowserCallBack(field_name, url, type, win) {
// This is where you insert your custom filebrowser logic
var win=tinyMCE.getWindowArg("window");
win.BrowseServer(field_name);
}

function tvOnTinyMCEChangeCallBack(i){
  i.oldTargetElement.onchange();           
}
</script>

This will help me get a better idea how it's being parsed on your end.  Thanks!  Smiley
Jeff Whitfield

"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"

-George Carlin

#10: 14-Jul-2006, 08:44 AM

Marschant
Posts: 133

Basically it's the block the display the html structure of the content i.e. path block shows div > p when you have a paragraph within a div selected. I disabled the new layer plugin as well as some others that I didn't need and all of a sudden the path displayed correctly. Very weird....

#11: 14-Jul-2006, 11:30 AM

Moderator

Bravado
Posts: 1,108

"I can learn to resist anything but temptation..."

WWW
Hmm...that is strange.  Let me know which plugin(s) you disabled and I'll change the code a bit.  I'm thinking that perhaps I need to add a few options that allows a user to select which plugins they want to utilize.  If the layer plugin isn't working right...well...might as well make it an optional thing.  Smiley
Jeff Whitfield

"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"

-George Carlin

#12: 14-Jul-2006, 08:16 PM

Moderators
yama
Posts: 935

MODx研究中

WWW
Please rewrite a part of the code of the treatment of Japanese LangFiles.

plugin.tinymce.tpl, line51.

Code:
case "japanese-utf8":
$returnlang = "ja";
break;

rewrite this.
Code:
case "japanese-utf8":
$returnlang = "ja_utf-8";
break;

case "japanese-euc":
$returnlang = "ja_euc-jp";
break;



Thanks


* mcelangjp.gif (6.72 KB, 554x260 - viewed 6561 times.)

#13: 15-Jul-2006, 09:42 AM

Moderator

Bravado
Posts: 1,108

"I can learn to resist anything but temptation..."

WWW
Consider it done, Yama!  Smiley  I reuploaded the zip file and updated the comments on the repository.  Didn't feel it was necessary creating a whole new version for this particular change.  But, it's up there!  Have fun!  Cheesy
Jeff Whitfield

"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"

-George Carlin

#14: 17-Jul-2006, 01:36 PM

Testers

Dimmy
Posts: 2,001

Я не говорю по-русски 私は日本語を話さない

WWW
I get the foloing error when loading the settings screen:
Code:
TinyMCE - OnInterfaceSettingsRender
An error occurred while loading. Please see the event log for more information.



--------------------------------------------------------------------------------

then this is in the events list:
Code:
Undefined index: fe_editor_lang

 

I updated to the latest version.

Dimmy

#15: 17-Jul-2006, 04:04 PM

Moderator

Bravado
Posts: 1,108

"I can learn to resist anything but temptation..."

WWW
Thanks, Dimmy.  I'll double-check the code and update it.  Looks like I need to add a check for a MODx setting that doesn't exist yet for backwards compatibility with the current version of MODx.  Funny...doesn't produce an error on my install.  I'm uploading a fix for it anyways though.

Jeff Whitfield

"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"

-George Carlin

#16: 18-Jul-2006, 05:35 AM

Testers

Dimmy
Posts: 2,001

Я не говорю по-русски 私は日本語を話さない

WWW
I noticed that when I set the language to english in the manager settings that this error does not ocure but using nederlands (dutch) it does

#17: 18-Jul-2006, 06:51 AM

Moderator

Bravado
Posts: 1,108

"I can learn to resist anything but temptation..."

WWW
Hmm...interesting.  Thanks for the tip, Dimmy...that'll help alot!  Smiley
Jeff Whitfield

"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"

-George Carlin

#18: 18-Jul-2006, 10:27 AM

Moderator

Bravado
Posts: 1,108

"I can learn to resist anything but temptation..."

WWW
Ok, Dimmy, I think I got it nailed down.  Redownload the zip file and overwrite your language files for the TinyMCE plugin.  Turned out to be a bad nederlands.inc.php language file for the plugin.  The same applies to FCKEditor...so if you are using the newest version, you'll need to download it again as well.  Man...amazing how one simple corrupted file can cause so many problems.  LOL!
Jeff Whitfield

"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"

-George Carlin

#19: 20-Jul-2006, 04:01 AM

Testers

Dimmy
Posts: 2,001

Я не говорю по-русски 私は日本語を話さない

WWW
I am glad that you found it and fixed it thanks alot

#20: 11-Aug-2006, 09:15 AM

fme_design
Posts: 17

WWW
Hi everyone,

I've attempted to load the TinyMCE plugin into my local installation and on my server, but keep receiving this error message once logged in to the Manager:

Code:
Undefined variable: php_errormsg

Warning: getTinyMCESettings(C:/Program Files/xampp/htdocs/assets/plugins/tinymce/lang/english.inc.php) [function.getTinyMCESettings]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\manager\includes\document.parser.class.inc.php(681) : eval()'d code on line 103

Warning: getTinyMCESettings() [function.include]: Failed opening 'C:/Program Files/xampp/htdocs/assets/plugins/tinymce/lang/english.inc.php' for inclusion (include_path='C:/Program Files/xampp/htdocs/manager/includes/') in C:\Program Files\xampp\htdocs\manager\includes\document.parser.class.inc.php(681) : eval()'d code on line 103

Trouble is, there's no such directory as C:/Program Files/xampp/htdocs/assets/plugins/tinymce at all - it hasn't been installed.

Any help would be appreciated,

Dan
Pages: [1] 2 3 ... 19   Go Up
0 Members and 1 Guest are viewing this topic.