MyBB Community Forums

Full Version: Problem with copied/pasted text
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello All, I moved a jeep forum last year from phpBB to myBB. A lot of users liked to use edit the text with color, bold, increase size etc. When I moved to myBB, after a couple of months I noticed when people copied/pasted text from a previous post it would show the code. We are a Jeep club, we do a sign-up list for events, we ask members to copy/paste last list and add their name to their post. At first I thought it was a tapatalk issue, pin pointed its the myBB code option in the themes. It would be impossible to ask members to copy/paste as plain text. Most claim that the forum is hard enough to use (thanks facebook). 

I turned off the MyBB option for a while. I was asked if it could be turned back on recently. I did this week, having a problem with it only in themes. When I delete any theme, it works fine when using the MyBBMaster Style. If had Emerald, tried Flatty, and MyResponsive. 
I do not know too much about the details of the code. 
Would someone point me to the right direction on how to fix this problem when using themes? I'll keep the default, but wanted to provide a couple of other options. 
I am attaching a screenshot how it looks like when text is copied/pasted to a new post.

Thanks.
To remove all formatting when pasting in the visual editor, you need to use a plugin for the editor (https://www.sceditor.com/documentation/p...plaintext/ ). You need to take following steps to make it work:

1. Download https://raw.githubusercontent.com/samcla...aintext.js to your jscripts/sceditor/plugins folder

2. Edit Ungrouped Templatescodebuttons template and add this line at the beginning:

<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/plugins/plaintext.js?ver=1821"></script>

Also in this template find the line:

plugins: "undo",

and change it to 

plugins: "undo,plaintext",
I thought I followed your steps. I put the line, <script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/plugins/plaintext.js?ver=1821"></script>
a couple of lines under the first one. didnt work. i put it in the beginning and it seems to work from my test.
Related post - https://community.mybb.com/thread-223638...pid1346298

Same here, followed steps, hard refreshed - no change.
Yes, it should be at the beginning of the template. Also Mybb version should be very recent, otherwise it will not work.

To check if file is uploaded correctly you can request www.yourforumurl.com/jscripts/sceditor/plugins/plaintext.js in your browser and see if the javascript file is loading without errors.
(2020-05-25, 08:29 PM)panayot Wrote: [ -> ]Yes, it should be at the beginning of the template. Also Mybb version should be very recent, otherwise it will not work.

To check if file is uploaded correctly you can request www.yourforumurl.com/jscripts/sceditor/plugins/plaintext.js in your browser and see if the javascript file is loading without errors.

Hey, thanks for this. Only issue I've been having is it doesnt seem to work with clients using Microsoft Edge.
(2020-05-24, 05:51 PM)panayot Wrote: [ -> ]To remove all formatting when pasting in the visual editor, you need to use a plugin for the editor (https://www.sceditor.com/documentation/p...plaintext/ ). You need to take following steps to make it work:

1. Download https://raw.githubusercontent.com/samcla...aintext.js to your jscripts/sceditor/plugins folder

2. Edit Ungrouped Templatescodebuttons template and add this line at the beginning:

<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/plugins/plaintext.js?ver=1821"></script>

Also in this template find the line:

plugins: "undo",

and change it to 

plugins: "undo,plaintext",

Did all of this, and the error is saying sceditor on line 59 (the last line) is undefined:
}(sceditor));

Any idea of a solution?