MyBB Community Forums

Full Version: Actually disable WYSIWYG editor and prevent it from auto-correcting custom BB Codes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Before you read all this, what I'm basically wondering on how to do are the following:
  • prevent WYSIWYG editor from being shown after hitting "Preview Post" (which is ignoring the setting you have selected in User CP)
  • preventing it from auto-correcting certain custom BB Codes after hitting "Preview Post" such as [u=dotted], [img=flip]
  • (optionally) remove the iframe in sceditor-container and permanently have the textarea displayed as inline-block by default.

I'm using MyBB 1.8.4 because it was announced 1.6 is being discontinued. Before I had a lot of fun with my other forum, editing it a ton and making it like a Frankenstein monster. =P
Here's a preview of my "New Reply" XD
[Image: 003274_zpshqkx3asw.png]
Had to get rid of regular smilies and went with my own custom smiley submenu because I wanted to categorize things better. ^^ That submenu works in 1.8 after some alterations, but my BB Codes are having problems working... (but always worked in 1.6, just some auto-correct function in 1.8 is bugging me). I've already read topics about disabling the WYSIWYG editor, but "Put the editor in source mode by default"  is not solving my issue. =/


Not that I don't like the idea of WYSIWYG editor option, but when it comes to my custom BB Codes and edits, it displays the source on them and sometimes even alters my text input. (I'll explain below)

Hitting Preview Post automatically changes the editor to WYSIWYG, ignoring if "Put the editor in source mode by default" option was selected or not.

My biggest concern, is that it is tampering with my input after I hit Preview Post...
Not all BB Codes are affected, just the ones where I tried to add more to already existing ones, like IMG tag, U tag, and so forth. =/
Here, let me show an example:

Input in Source Mode:
[Image: 003275_zpsffpfolke.png~original]

In the Preview after hitting the "Preview Post" button
[Image: 003276_zps3qcxmhhb.png~original]

Below, in the editor (which automatically changes to WYSIWYG)
[Image: 003277_zpstzbdzki4.png~original]

In Source Mode
[Image: 003278_zpsoqahoges.png]

If I were to preview again, it would then look just like what is in the WYSIWYG editor and make my custom BB Codes most likely unable for usage. They DO work however when I do NOT preview prior to submitting, but I very commonly preview what I am writing so that would just prevent me from using these custom BB Codes. =/


So... is there any way to disable or get rid of the auto-correct feature that affects both editors after hitting the "Preview Post" button? And either a way to get rid of the WYSIWYG editor, preventing it to be selected after previewing, or edit it to also show WYSIWYG with my custom codes?

I honestly don't want to go back to the 1.6 version because the CSS and image usage looks much better in the 1.8 version and I overall feel like that if that with the editor can be resolved will be a great forum to work with. =) Thank you for reading!

PS: Had an account on here but can't log into it... Guess I screwed up with my password before, oh well. ^^;
I would like to know this too!
Thanks for the reply! I thought I'd be the only one who would want to do such thing and would never get any responses. ^^

I decided to ask if it's possible to use the old editor if possible (http://community.mybb.com/thread-172022.html), seeing if that's maybe a possibility. =) It wouldn't look as great... but it would be great to customize for sure! ^^
Custom MyCode variants are being fixed here: https://github.com/mybb/mybb/issues/1674

I'm using source mode and Preview Post never changed to WYSIWYG for me in 1.8.5. I guess you're using an older version based on that - you should always update to the latest minor version. And if you're using 1.8.5, provide your board URL and a testing account to test it. Yep, I read your post again and you're on 1.8.4 which had a bug in SCEditor which ignored the UCP setting as a side effect.

Not sure why you want to remove the iframe, but you'd have to edit SCEditor files to acheive that.
If you don't mind a plugin, Doyle here has released a new editor that I feel is much better without the feel of WYSIWYG. It also lets you add your own buttons and straight bbcode mode, with optional preview.

http://doylecc.altervista.org/en/mheditor.html
(2015-06-23, 12:27 AM)ashkir Wrote: [ -> ]If you don't mind a plugin, Doyle here has released a new editor that I feel is much better without the feel of WYSIWYG. It also lets you add your own buttons and straight bbcode mode, with optional preview.

http://doylecc.altervista.org/en/mheditor.html

or this http://community.mybb.com/thread-167712.html
has only 2.09 KB
(2015-06-23, 12:25 AM)Destroy666 Wrote: [ -> ]Custom MyCode variants are being fixed here: https://github.com/mybb/mybb/issues/1674

I'm using source mode and Preview Post never changed to WYSIWYG for me in 1.8.5. I guess you're using an older version based on that - you should always update to the latest minor version. And if you're using 1.8.5, provide your board URL and a testing account to test it. Yep, I read your post again and you're on 1.8.4 which had a bug in SCEditor which ignored the UCP setting as a side effect.

Not sure why you want to remove the iframe, but you'd have to edit SCEditor files to acheive that.

I am using MyBB 1.8.5 but I have exactly same issue as the OP was having with.
Is there the latest version of SCEditor?
Which issue? And what's your board URL (+ a testing account)?
(2015-06-26, 09:57 PM)Destroy666 Wrote: [ -> ]Which issue? And what's your board URL (+ a testing account)?

Oh, I just realized you gave me your reply.
Sorry for late reply you back.

I have a problem related an editor with the BBCode tags.
My issue is the BBCode tag change something wrong tag automatically when I submit the preview post.

[Image: GeGPJp1.gif]

One of issue is the font size tag is disappeared automatically after clicking the preview post.
Another error is the custom BBCode "hide" tag is changed "quote" tag automatically when I submit the preview post.

I will send you my info via PM.
Thank you very much for your help.
(2015-06-29, 11:23 AM)bbbs Wrote: [ -> ]
(2015-06-26, 09:57 PM)Destroy666 Wrote: [ -> ]Which issue? And what's your board URL (+ a testing account)?

Oh, I just realized you gave me your reply.
Sorry for late reply you back.

I have a problem related an editor with the BBCode tags.
My issue is the BBCode tag change something wrong tag automatically when I submit the preview post.

[Image: GeGPJp1.gif]

One of issue is the font size tag is disappeared automatically after clicking the preview post.
Another error is the custom BBCode "hide" tag is changed "quote" tag automatically when I submit the preview post.

I will send you my info via PM.
Thank you very much for your help.

size 12 not valid. you need use something like x-large etc...
you make edit to add hide button? something you not make correctly. undo the changes (replace with fresh file, revert changes in template etc...)
And use this plugin to add button http://community.mybb.com/thread-168909.html
Pages: 1 2