We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6221
    • 36 Posts
    Hi!

    I was wondering, is it possible to "force" the editor to use a specific font/size as standard (even when copied from ex. word) but keep everything else (like bold/italic and underline??)

    So basicly, what I am saying is: When I copy a text (either from IE/Firefox or from Word) I would want that text to be formatted to a specifik size and font.

    Anyone knows how, please let me know...
      • 22815
      • 1,097 Posts
      So, essentially ignore font face and font size but keep bold/italic/underline.

      I’ve amended the subject line, as "is this possible???" subjects are not specific enough.

      Your request is interesting, and I can see how it would be very useful. I’m not very familiar with the paste-from-Word thing because I tend to paste as text and format in HTML myself.

      I believe one of the editors has a "paste from Word" option which cleans up some of the crazier tags that would otherwise be imported; this could conceivably be extended to remove font formatting.
        No, I don't know what OpenGeek's saying half the time either.
        MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
        Forum: Where to post threads about add-ons | Forum Rules
        Like MODx? donate (and/or share your resources)
        Like me? See my Amazon wishlist
        MODx "Most Promising CMS" - so appropriate!
        • 6221
        • 36 Posts
        ah, sorry for doing that laugh

        yes, this is useful for me because I have 20 different people that will be publishing news, and I would like the pages to look the same, and since these people have nearly zero experience with html that is not an option, and sure they could change the sizes and stuff themself, but IF it could be done automatically, that would be much better...

        but you are right, maybe I could look into what the "paste from word" thingie does, thanks for pointing that out for me, *sometimes the easiest solution is right in front of your eyes laugh *


        but, others are welcome to add in and tell if they have done something like this works...

          • 36451
          • 264 Posts
          Yes, "Paste from Word" will do the job.

          In addition, in TinyMCE you can disable some unwanted buttons. Given, you use the "advance" theme, you will simply edit the tinyMCE plugin (Resources -> Plugins). Have a look at line 223, it’s
          theme_advanced_buttons1_add : "fontselect,fontsizeselect",
          Delete this line and the font buttons are gone wink
            • 6221
            • 36 Posts
            ok, so now I have found that Paste from Word works great..
            unfortunatly it also removes bold/italic and underlines...

            but I am looking into it,

            is there a way to make this "the default" paste action?
              • 6221
              • 36 Posts
              Ok, so I have changed to tinymce (with fckeditors filemanager)
              and modified tinymce source to always do pastetext when using ctrl-v

              However, while this is a step in the right direktion, I still would like to know If i can get bold/underline/italic to show up like "original text" while not setting the size of the fonts.
              but for now, this will work pretty well..

              this is the link for how to set ctrl-v
              http://tinymce.moxiecode.com/punbb/viewtopic.php?id=2077
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                I would imagine that somewhere in the code there is a list of tags...I think I could do a lot of highlighting and clicking on the Bold button before I would be motivated to dive into that!

                Check out assets/plugins/tinymce/jscripts/tiny_mce/plugins/paste/editor.plugin.src.js

                Line 171, the _insertWordContent function is what you want.
                  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
                  • 22815
                  • 1,097 Posts
                  Actually, when I’ve pasted text into the plain text editor that has been supplied in Word, the in-paragraph bold and italic parts are always the most annoying bits to do - headings are obvious, lists are obvious, but dertermining what the client wants in bold or italic always requires cross-reference to the original document.

                  A paste-from-Word-keeping-only-B-and-I would actually persuade me to use the RTE.

                  Susan, thanks for finding the section.
                  Cybertron, thanks for finding the method for overriding ctrl-v.

                  I’m going to look at this right now.
                    No, I don't know what OpenGeek's saying half the time either.
                    MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                    Forum: Where to post threads about add-ons | Forum Rules
                    Like MODx? donate (and/or share your resources)
                    Like me? See my Amazon wishlist
                    MODx "Most Promising CMS" - so appropriate!
                    • 22815
                    • 1,097 Posts
                    Hang on, are you sure you’re using Paste from Word in TinyMCE and not Paste As Plain Text?

                    I get all the formatting with the Word paste. Looks like you need something in between the two.
                      No, I don't know what OpenGeek's saying half the time either.
                      MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                      Forum: Where to post threads about add-ons | Forum Rules
                      Like MODx? donate (and/or share your resources)
                      Like me? See my Amazon wishlist
                      MODx "Most Promising CMS" - so appropriate!
                      • 6221
                      • 36 Posts
                      Hi

                      sorry for taking so long to respond, but I’ve been busy playing with the new 0.9.5 ..


                      yeas right now i have a middle thing between plain text and word, because, when pasting into the editor everything that is bold gets bold and italic gets italic, although Headings are NOT being bold/italic/bigger (this is right though) but I have not looked into this a lot yet, since it is wokring ok, but I still wanna be able to "lock" the fonts/sizes to specific ones, (to all site) but the css only workes partially since one can override it, any ideas on this?