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

    i used the classExtender to add some fields to my users. Everything works fine, but if i use Textareas i run into trouble.

    If i try to save an Textarea like that at the backend
    ***
    First Line
    Second Line
    ***
    It looks like this after saving and reloading the page
    ***
    First Line
    Second Line
    ***
    and it looks like that at the frontend
    ***
    First Line
    Second Line
    ***

    If i try the same BUT save it at the frontend using UpdateProfile it looks like that at the frontend
    ***
    First Line
    Second Line
    ***
    and like that at the backend
    ***
    First Line
    Second Line
    ***

    Any idea how i get it looking like that at the backend?
    ***
    First Line
    Second Line
    ***



    Backend Editing HTML
    <div class="x-form-item x-tab-item">
      <label class="x-form-item-label" style="width:auto; font-weight:bold; float:none; font-size:12px">Address</label>
    
      <div class="x-form-item x-tab-item"><textarea name="evzAddress" class="x-form-textarea x-form-field" rows="2" cols="70" onclick="Ext.getCmp('modx-panel-user').markDirty();">[[+evzAddress]]</textarea>
      </div>
    </div>


    Frontend Editing Template
    [[!UpdateProfile?
    	&validate=`evzEmail:email,evzAddress:stripTags,evzDescription:stripTags`
    	&useExtended=`0`
    ]]
    <textarea rows="2" name="evzAddress" id="evzAddress" data-value="[[+address]]">[[!+evzAddress]]</textarea>


    myShema
    <field key="evzAddress" dbtype="text" phptype="string" null="true"/>
      • 38783
      • 571 Posts
      I may be missing something but I can't see any difference between any of your examples and consequently don't really understand your question.

      Is it possible that the formatting of the text in your Forum post has not displayed as you anticipated?

        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
        • 45766
        • 78 Posts
        Hi Andy,

        Sorry - it was a little bit confusing wink

        The Problem is, that if i edit the textarea at the backend user edit window linebreaks will be saved as
        <br />
        .

        AND it shows line breaks from the Data-Base as
        <br />
        in the textarea

        The frontend editing works fine. [ed. note: stefan79w last edited this post 6 years, 8 months ago.]
          • 3749
          • 24,544 Posts
          That sounds like an issue with TinyMCE.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 42562
            • 1,145 Posts
            Yup. With the way it was implemented right there.
            Encoding/decoding issues upon save
              TinymceWrapper: Complete back/frontend content solution.
              Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
              5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
              • 45766
              • 78 Posts
              Hm. But the textarea used for the default user address works fine. Just the new textareas not.
              And the code looks the same.

              Any idea how to say the manager that it is just an textarea not rhich text?
                • 42562
                • 1,145 Posts
                What MODX Extra is supplying you with the TinyMCE rte?
                  TinymceWrapper: Complete back/frontend content solution.
                  Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
                  5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
                  • 45766
                  • 78 Posts
                  I use the "TinyMCE" extra
                    • 45766
                    • 78 Posts
                    Nope. I Removed the extra. Same behavior
                      • 3749
                      • 24,544 Posts
                      I would say the removal of TinyMCE was incomplete, or the cache needs to be cleared manually (delete all files in the core/cache directory).

                      MODX itself does not modify HTML -- ever -- so unless you have a plugin or another editor that's doing it, or a browser add-on, it has to be Tiny.

                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting