We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8619
    • 229 Posts
    I am in desperate need of some help!

    I am using the NewsEditor snippet (part of newsmanager) to allow my editors (bosses) to post to our site. The problem that I am having is that when they use the generic content box that comes with the newseditor, there is no styling options.

    If they hit return for a new paragraph, or try any other styling, such as tabs, etc., all of the content is running together when it is posted.

    So, Can TinyMCE be used as a RTE with NewsEditor for the generic content section on that form? I am not sure how to do it, and have read all the documentation, searched all the forums, and have a deadline looming to get this site online.

    Here is my call for the NewsEditor:

    [!NewsEditor? &folder=`31` &postid=`33` &clearcache=`1` &template=`global_newsitems` &rtcontent=`[*tvPostContent*]`!]

    I am using a TV that is the RTE for tinyMCE with the following settings:

    RichText - input type
    [+content+] - default value
    RichText widget using TinyMCE

    Any help here would be appreciated, as I had posted a question about this in another forum question, but it hasn’t been answered.

    Thanks in advance, and if I can give further info, please let me know as this is the only thing left that is holding this site back from moving ’live’.

    Thanks!
      • 8619
      • 229 Posts
      What I am looking for with this is something similar to this:

      http://projects.zerobarrier.nl/modx/Jot.html

      If you notice in the comments section, if your type in Test, hit return, then Test, hit return, then test again, it shows it just how it is typed.

      When using the News Editor/Manager snippet, it is not holding the styling that is entered. If my editor enters a paragraph, then hits return to start a new one, when the post is published and shows up, the styling is gone.

      Someone please help me with this, I can’t figure it out, and don’t consider myself to be stupid with MODx, as I have asked for help before, but can’t figure this one out.
        • 8619
        • 229 Posts
        I solved my own question, only took me about 30 hours to do so, and if anyone else is wondering how to integrate a Rich Text Editor (TinyMCE in this case) into their News Editor snippet for creating posts, here is how I finally accomplished it. Comments are welcome from everyone!

        Created the NewsEditor and NewsManager pages like the snippet suggestion makes: http://modxcms.com/NewsManager-810.html;

        I created these two documents under an unpublished folder so that the folder doesn’t show up in Ditto calls, and I can modify things around a bit;

        Took the template code out of the NewsEditor snippet call and saved it as a chunk {{postcomments}}, and made a modification to the Content text area as follows:

        Changed the line from: Content:
        <textarea name="content" cols="50" rows="8">[+content+]</textarea>


        to: Content:
        [*PostComment*]


        Used this call on the Editor page:

        [!NewsEditor? &folder=`31` &postid=`33` &clearcache=`1` &template=`global_newsitems` &rtcontent=`tvPostContent` &formtpl=`postcomments`!

        This called my template for the final post, set the TV to use (coming up next) and pulled the ’custom’ form that was just created.

        Next, create a TV and call it PostContent;

        Here are the settings for that part:

        Input Type: RichText
        Input Option Value: @CHUNK postcomments
        Widget: RichText
        (set your sizes here)
        Use TinyMCE for the editor (or another of your choosing)

        BE SURE TO SELECT THE TEMPLATES THAT THIS CAN BE CALLED BY AND YOUR ACCESS PERMISSIONS!!!!

        I claim to definately not be an expert with php, but this is how I finally figured it out, along with setting the document permissions and groups correctly, finally.

        Hope someone can find this useful!

        God Bless!




          • 7923
          • 4,213 Posts
          Anything is possible when you just put your mind to it.. good job! laugh


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 8619
            • 229 Posts
            I guess so....just wondering where my mind has been these last few weeks.....I sure hope it had a great vacation! grin

            Thanks for the help also from the other question to doze!

            Now, back to reattaching my mind....... rolleyes
              • 26471
              • 17 Posts
              ejcross, thanks for posting your TinyMCE integration adventure, I’ve followed your instructions and have not been able to replicate your success entirely.

              Specifically, when editing news posts, the textarea does not show the post data, it’s entirely blank. I figure it’s because the "[+content+]" variable is not populated with the post data, since after following the instructions, the "postcomment" chunk no longer has a reference to this variable, and the [*PostContent*] template variable does not know anything about "[+content+]" replacement either.

              Have I missed something along the way? Any feedback / suggestions appreciated!

              Cheers
                • 26471
                • 17 Posts
                Never mind, I solved my own problem.. turns out I forgot to insert the @EVAL code from NewsEditor docs to retrieve post data (Default Value field of PostContent TV). My bad grin
                  • 6100
                  • 6 Posts
                  Thanks very much for the tutorial.


                  I followed the steps, but all I see is an edit bar with bold,italic,underline and insert/edit link.

                  Appreciate any help, in getting the full editor to show. Thanks
                    • 6100
                    • 6 Posts
                    solved my problem of not seeing full editor:

                    Went to resource/plugin/editor/configuration and changed the editor.