We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4018
    • 1,131 Posts
    Quote from: acriis at Jun 08, 2006, 08:11 AM

    Hi,
    Just installed the plugin and it works fine except that I need norwegian language for tinymce - and I just can not get anything but english. The language file for MODx manager comes up ok, but tinymce appears in english even if I hardcode the language name in the tinyMCE.init code in plugin.tinymce.tpl.

    I would also like the content from Tiny to be utf-8 encoded.

    Could someone with tinymce knowledge please tell me how to fix this? (yes, I already looked for solution in moxiecode.com forum without finding the solution.)
    -And thank’s for MODx !

    Hi there!

    Actually, the language files referenced in the TinyMCE plugin code is correct. When you select Norsk in the language setting under System Configuration / Site Settings, TinyMCE will be set to use the correct Norwegian language files (nn.js). Keep in mind that this only applies to the manager itself; language settings are not currently implemented for front-end use. Just to be sure that it’s working right, I retested the plugin in both Firefox 1.5 and Internet Explorer 6.0 on Windows XP...works fine for me. Now, in regards to the language settings used to describe some of the manager related configuration features, I do need to have that particular language file translated. You can find it here:

    assets/plugins/tinymce/lang/norsk.inc.php

    If you’d like, feel free to translate it for me, zip it up, and post it here so I can include it in the next release.

    Now, in regards to UTF-8 encoding, I’m not 100% sure but according to this post on the Moxiecode site (http://tinymce.moxiecode.com/punbb/viewtopic.php?id=1288) I think you might be able to add some entities in so that the characters are displayed properly. I’ll add in a parameter to the plugin that allows for adding in the entities without the need for editing the plugin code directly. But for now you could try adding in the entities parameter to the tinyMCE.init lines in the plugin code. According to the above post, this parameter could be added in to allow for some UTF-8 support:

    entities : "38,amp,34,quot,60,lt,62,gt",


    Try adding it in just below one of the other parameter lines in the tinyMCE.init lines for the $fullScript parameter. I’ll be curious as to whether this works or not.

    Hope this helps! smiley

    Jeff
      Jeff Whitfield

      "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
      • 382
      • 6 Posts
      Jeff,

      Thank you for a very fast reply. I enclose a zip file where you will find two files, both in utf8 encoding. One for the MODx lang translated into norwegian bokmål (nb) which is more in use than norwegian nynorsk (nn) and the one for Tinymce in norwegian bokmål (nb). I had named the MODx lang file norsk-utf8. As soon as I renamed it norsk everything worked as expected. Stupid of me not to try that before. But - anyway we have two norwegian languages. Also - to complicate further there is the ISO code no which normally is the same as nb. I used the swedish language file for the translation, and I get a message that the number of translated strings are not ok. I will correct this as soon as I get time to look into it. smiley
      Thanks for your advice for utf8 inside the editor. I will try it out later this evening if time permits.

      Arne C

      Correction! The Tinymce menus comes up in norsk nyorsk nn even after I modified the code in plugin.tiny.tpl to return nb instead of nn- strange. Maybe caching problem? I will spend some more time on this tomorrow.
        • 382
        • 6 Posts
        Jeff,
        Norwegian menus and utf8 encoding solved!

        As a newbie I worked on the plugin.tinymce.tpl directly, and that’s why none of my changes showed up. Lesson learned. Do it from the manager.

        Menus solution: Downloaded nb files from Moxie, changed them to utf8, renamed them and and changed the plugin.tinymce.tpl code to reference these files.

        utf8 in the editor: tinymce option entity_encoding can be set to named, raw, numeric. Default is named.
        http://tinymce.moxiecode.com/tinymce/docs/option_entity_encoding.html
        When entity_encoding is set as named there is a comma separated list in the two files Tiny_mce.js and tiny_mce_src.js with a character code, character pair. Just remove the character pairs you don’t want translated - and everything is fine. smiley

        Arne C.
          • 36451
          • 264 Posts
          Quote from: acriis at Jun 09, 2006, 05:32 AM

          utf8 in the editor: tinymce option entity_encoding can be set to named, raw, numeric. Default is named.
          Perfect! Thank you, Arne. I added
          entity_encoding : "raw",
          and now everything works like a charm with my utf-8 based project. All characters are stored readable for humans smiley in the MySQL 4.1 database.

          Again, thank you for the pointer.
            • 33014 ☆ A M B ☆
            • 1,231 Posts
            Japanese lang files attached.
              • 36805
              • 354 Posts
              I’m not entirely sure if this has been reported before but here we go anyway:

              When i edit a document which has an edittable RichText based TV associated with it the TinyMCE box for that does not fit the browser’s space. Unfortunately no horizontal scrollbar shows up so the outermost right buttons cannot be reached by any means (except by switching back to editting with the core FCKEditor). I tested this in the IE and in FF.

              I will attach an image for everyone’s convenience smiley As you can see in there it would fit if the caption and description of the TV would not be at the left of the edit area.
              The best solution to this would imho not be adjusting the width of the editor but instead have the TV-caption and TV-description appear above the edit area instead of at its left (if possible).
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                What happens if you close or just narrow the docuement tree frame?

                (checked it out for myself, that will solve the problem.)
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 36805
                  • 354 Posts
                  Quote from: sottwell at Aug 10, 2006, 07:44 AM

                  What happens if you close or just narrow the docuement tree frame?

                  (checked it out for myself, that will solve the problem.)

                  Thank you, that does the trick.
                    • 32288
                    • 5 Posts
                    Quote from: jwtyler at May 16, 2006, 12:47 PM

                    Any work on the resize editor issue?
                    I’ve tracked the culprit to:
                    assets/modules/quick_edit/javascript/editor.js

                    Around line 26, there is a function called "fitWindow()"... its purpose is to resize the window based on the block size of the main form of the page... so for small forms, the window is small, for large forms, the window is larger. It resizes the pop-up window regardless of what settings you made to the window size in line 16 of: assets/modules/quick_edit/javascript/output.js

                    For some reason, neither the .offsetHeight nor .offsetWidth work properly (at least not with the browsers I tried), or perhaps the problem is with how the texteditor is layed out -- I’m using Xinha, and it’s probably the same issue for TinyMCE.

                    If you comment out line 31 in editor.js, so it reads:
                    // top.resizeTo(w, h+heightMargin);
                    Then the window won’t resize. (Be sure to clear your browser cache before trying again.)

                    You will lose the nice aesthetic QuickEdit window-resizing -- all popups will be the default size, even the small forms -- but at least you won’t have to resize the popup window manually for every edit.
                      • 8439
                      • 89 Posts
                      Hi,

                      I have a problem with tinyMCE not displaying line breaks when editing html. The cure is to set a variable in tinyMCE.init() however it is unclear how to do this.

                      tinyMCE.init is defined in the snippet, am I supposed to edit the snippet?

                      TIA

                      Ed