SCEditor icon indicating copy to clipboard operation
SCEditor copied to clipboard

Description is removed automatically using Code, hr, b, u, i, s tags

Open martec opened this issue 10 years ago • 17 comments

Not reported by me...

Reported by: http://community.mybb.com/thread-163255.html

Create a new custom MyCode: Regular Expression: Code: 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.

And happen too with other tags hr, b, u, i, s....

https://github.com/mybb/mybb/issues/1674

martec avatar Dec 02 '14 13:12 martec

SCE does not accept regex as search and replacement for tag finding and processing. Which javascript is MyBB generating to define that tag for SCE?

brunoais avatar Dec 02 '14 17:12 brunoais

@brunoais better you see video.... http://www.dailymotion.com/video/x2ble7s_editor20_tech

what happen is sceditor remove description from code, b, u etc... tags... when go to WYSIWYG mode and return to source mode.

martec avatar Dec 02 '14 18:12 martec

@martec That's by design. Is anything wrong with the design? Anyway, @martec, Please answer my question:

Which javascript is MyBB generating to define that tag for SCE?

I'm not rejecting anything yet. I'm still trying to diagnose the situation.

brunoais avatar Dec 02 '14 20:12 brunoais

@brunoais

simple thing... this happen too with site sceditor.com , we not want that editor remove description from code, b, u, i etc tags, because has people that use description in default tag of sceditor...

martec avatar Dec 03 '14 05:12 martec

Let me see if I understand this... What you want is that, by default, SCE store all BBCode tag parameters in the HTML whether or not it recognizes them, is that it?

brunoais avatar Dec 03 '14 07:12 brunoais

@brunoais

i believe that "not it recognizes them" is better... but i will ask to mybb developers...

martec avatar Dec 03 '14 18:12 martec

@brunoais

https://github.com/mybb/mybb/issues/1674#issuecomment-65713785

thanks

martec avatar Dec 05 '14 05:12 martec

I cannot do that. A BBCode tag and it's parameters are not an unity. There's the BBCode tag which exists or not at that position. By existing, it gathers its parameters so that the tag handler can work with them.

All solutions I can think of, do not solve that as they would not produce the wanted result for this editor. The only good solution is to override all tags with that concept. I can help you making the code required for it, if you want, just ask.

brunoais avatar Dec 05 '14 11:12 brunoais

@martec

Which javascript is MyBB generating to define that tag for SCE?

brunoais avatar Dec 09 '14 17:12 brunoais

@brunoais https://github.com/mybb/mybb/blob/feature/jscripts/bbcodes_sceditor.js

martec avatar Dec 09 '14 18:12 martec

I'll look closer later today or tomorrow.

brunoais avatar Dec 11 '14 08:12 brunoais

some result??

martec avatar Dec 16 '14 19:12 martec

sorry I forgot. I don't really know what should be done... Better ask Sam.

brunoais avatar Dec 17 '14 19:12 brunoais

@samclarke Please read this.

brunoais avatar Mar 08 '15 20:03 brunoais

@samclarke have solution for this? or need recreate all tags to avoid this issue?

martec avatar Mar 16 '15 03:03 martec

@samclarke, any possible solution other than recreating all commands ourselves? Thanks in advance for any input.

Destroy666x avatar Jun 28 '15 12:06 Destroy666x

This will be fixed by #544

samclarke avatar Nov 16 '16 02:11 samclarke