1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Disable formatting

Discussion in 'XenForo Questions and Support' started by igrec, May 11, 2013.

  1. igrec

    igrec Member

    Hi everyone, any solution for disabling formatting for copy-paste from m$ word and html?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    There is a user preference for the rich editor:

    http://xenforo.com/community/account/preferences

    You can mass update the editor preference of all existing users by running this query:

    Code:
    UPDATE xf_user_option
    SET enable_rte = 0;
    
    You can set the default prefs for new users here:

    Admin CP -> Home -> Options -> User Registration -> Default Registration Values

    But there is no option there for the editor.
     
  3. igrec

    igrec Member

    Hi, thank you but that would lead to simple text editor for all users. I just don't wanna formatting of the copied text. Cos it even saves the share button icons. And tons of unnecessary links and formatting.

    Have a look

    janie_aire ([​IMG]janie_aire) wrote in [​IMG]doctorwho,
    2013-05-11 13:45:00
    meta: The Secret of Alchemy -- Crimson Horror

    Originally posted by [​IMG]janie_aire at meta: The Secret of Alchemy -- Crimson Horror
    Doctor Who meta: The Crimson Horror

    spoilers through the episode

    Alchemy, The Hero's Journey, and Narrative Compression

    This episode is so dense, so laden with imagery and themes and good meta stuff! It's taken me a while to process it -- in fact, I'm still processing. But it's also been one of those weeks, just having a hard time concentrating, and this was a story that required more research on my part than I'm accustomed. I would have gotten this up yesterday, but I was found by a bottle of Chianti and passed out before I could really get started. Today, however, I awoke fresh and alert, so here we are, better late than never!

    The Secret to Alchemy

    [​IMG]
    There are two refreshments in your world the color of red wine. This is not red wine.
     
  4. EQnoble

    EQnoble Well-Known Member

    Just download notepad++, paste what you copied in there....and then copy that and paste it in the post.
     
  5. igrec

    igrec Member

    You are joking me, right? I know how to get rid of formatting. But it's impossible to nail it itno the users' heads

    in IPB I can put a line into the js of cke
    Code:
    config.forcePasteAsPlainText = true;
    And that will do the job.

    Am I the only one with this kind of concern?
     
  6. EQnoble

    EQnoble Well-Known Member

    Not joking at all....how am I supposed to know that is what you mean...
    Your question was....

    Hi everyone, any solution for disabling formatting for copy-paste from m$ word and html?


    What about when someone wants formatting included in a pastejob and what about people who already are wise enough to work around it when they have to...you now just increased the workload for people who do utilize it when they do want the formatting included when pasting from other sources.


    Anyways, point was as soon as you specified MSword you made it about something not having to do with xenforo in my mind and that is how I answered you.

    In answer to your last question no...I am not concerned. If you have to make a workaround for every tendency of every user of every forum you end up with crap. However if you really need it you can make a simple js function that runs when a user pastes text to do what you are looking for.

    example...
    http://stackoverflow.com/questions/2875027/clean-microsoft-word-pasted-text-using-javascript


    Code:
    function cleanWordPaste( in_word_text ) {
    var tmp = document.createElement("DIV");
    tmp.innerHTML = in_word_text;
    var newString = tmp.textContent||tmp.innerText;
    // this next piece converts line breaks into break tags
    // and removes the seemingly endless crap code
    newString  = newString.replace(/\n\n/g, "<br />").replace(/.*<!--.*-->/g,"");
    // this next piece removes any break tags (up to 10) at beginning
    for ( i=0; i<10; i++ ) {
      if ( newString.substr(0,6)=="<br />" ) {
      newString = newString.replace("<br />", "");
      }
    }
    return newString;
    }


    I just find it unneeded in general and personally think this is not worth the time or bytes, just saying that I would be pissed off if I had to stop being able to utilize copy and paste in posts so that people who insist on using MSword can paste from documents formatted in hell.​

    Now that I think about it, you can just create a bbcode for people to use who insist on pasting from MSword which would strip all of the formatting.​

    I just don't see a need for it when anyone with a computer already has the tools on their local machine to make this not be an issue nor do I think that people who take the time to learn how things work should be punished (and have to spend more time when pasting text that is actually formatted in a way that makes sense) so that a smaller group of people can do what they do without learning anything.​


    Best of luck to you and no I am not joking about that either.​
     
  7. cclaerhout

    cclaerhout Well-Known Member

  8. igrec

    igrec Member

    I wound ask it here if I didn't need it , right? What is really pissing me off is the fackt that users can copy and paste like this

    IPS News

    Public Relations
    • [​IMG]
    • IPS Staff
    • [​IMG]
    • 920 posts
    Posted 03 May 2013 - 03:21 PM
    [​IMG]
    POPULAR
    Security Update: 3rd May 2013

    A critical security issue has been reported to us which may allow unauthorized access to an administrator account. We are releasing a security patch to address this issue. In the interest of allowing customers ample amount of time to apply the patch, we are not disclosing further details at this time.

    Instructions

    We are providing a patch for IP.Board versions 3.4, 3.3 and 3.2. If you are running a version less than 3.2 you should upgrade to get this and other security enhancements.

    While IPS does not apply patches for you, patching is very easy:
    • Identify the version of IP.Board you are running.
    • Download and unzip the appropriate patch file below that matches your version.
    • Upload the contents of the extracted zip folder to your IP.Board home directory
    • If you have renamed your admin directory, then copy the files manually to the appropriate admin folder.
    IP.Board 3.4.x
    [​IMG] 3.4.zip 76.46K 4943 downloads

    IP.Board 3.3.x
    [​IMG] 3.3.zip 70.88K 1293 downloads

    IP.Board 3.2.x
    [​IMG] 3.2.zip 64.78K 600 downloads



    Important Notes:
    • When you apply the security update, the bulletin in your AdminCP will still display. We keep the bulletin in place for at least a week after a security release.
    • Our main software packages accessed via the client area have already been updated with this security update.
    • If you are an IPS Hosting client your community has been automatically patched. No further action is needed.
    • As this is not a full upgrade but a simple upload a file and you're done patch, IPS staff will not apply this patch as part of our support services.

    We would like to thank security researcher John JEAN for his responsible disclosure of this issue to us. His information is as follows, and shared with permission:
    Back to News and Information

    • [​IMG]
    • [​IMG]
    • [​IMG]
    • [​IMG]
    • [​IMG]
    • [​IMG]
    • [​IMG]
    • [​IMG]


    Pretty nice hun?
     
  9. igrec

    igrec Member

  10. AndyB

    AndyB Well-Known Member

    igrec likes this.
  11. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

Share This Page