MyBB Community Forums

Full Version: Custom MyCodes not accepted by editor.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Create a new custom MyCode:
Regular Expression:
\[code=gist\](.*?)\[/code\]

Now try your new MyCode in a new thread/post. The code gets replaced by a common [code] MyCode.

Full or source editor doesn't makes the difference it seems.
so use partial mode...
full WYSIWYG mode not support description to code and php tag.
(2014-11-23, 05:03 PM)Omar G. Wrote: [ -> ]Full or source editor doesn't makes the difference it seems.

And when I click the "Preview Post" button the same happens, description is removed. And regardless of editor mode, it shouldn't happen.
(2014-11-30, 02:38 AM)Omar G. Wrote: [ -> ]
(2014-11-23, 05:03 PM)Omar G. Wrote: [ -> ]Full or source editor doesn't makes the difference it seems.

And when I click the "Preview Post" button the same happens, description is removed. And regardless of editor mode, it shouldn't happen.

if you see code of sceditor of part of "tag code" is very complex... Not simple thing...
you can check that has several elm === 'code', $(currentBlockNode).is('code'), parents('code') etc...
so try change part of this code will generate several bugs and bugs...

and description of code tag is not default thing of mybb.
and i don´t understand why need use full WYSIWYG mode... If Xenforo, vbulltin use only partial mode.
(2014-11-30, 03:03 AM)martec Wrote: [ -> ]and description of code tag is not default thing of mybb.

I partially agree and partially not. It breaks possible MyCode/plugin extensions for the code tag which it shouldn't do (only [code](.*?)[\/code] should be considered by SCEditor, the rest ignored), but it has a very low priority in my opinion.

(2014-11-30, 03:03 AM)martec Wrote: [ -> ]and i don´t understand why need use full WYSIWYG mode... If Xenforo, vbulltin use only partial mode.

Because some users prefer it. It's in the core so we won't accept bugs for it. Also, I can say that IPB and WP use editors with full mode too, but how does that matter here?
Again, editor mode doesn't matters once you click the preview button. And I would like to keep my [code=github] MyCode.
(2014-11-30, 04:21 AM)Omar G. Wrote: [ -> ]Again, editor mode doesn't matters once you click the preview button. And I would like to keep my [code=github] MyCode.

if you use partial mode, not has any problem with preview button.
or you making some confusion with partial mode and source mode?
Yes I may be confusing it but this yet happens in a local fresh installation.
(2014-11-30, 10:05 AM)Omar G. Wrote: [ -> ]Yes I may be confusing it but this yet happens in a local fresh installation.

i tested in my forum and fresh install and editor not change
[code=github] xxxx [/code]

to
[code] xxxx [/code]

when clicked in previw post etc... if you use partial mode
It happens in here using the source mode as default mode.
Pages: 1 2