[Pushed] Smilies are displayed as codes in WYSIWYG Editor Mode [+Solution]
#1
Hi,
In WYSIWYG Editor mode, after inserting smilies, If any text is inserted into editor (or if any keys of keyboard is pushed), The smilie image is automatically converted to its source code! (Browser: Firefox)

   

   

Solution:

Open: inc/functions.php

Find:

					$onclick = ' onclick="console.log(MyBBEditor); MyBBEditor.insertText(\''.$smilie['find'].'\');"';


Replace:

					$onclick = ' onclick="console.log(MyBBEditor); MyBBEditor.insertText(\' '.$smilie['find'].' \');"';
Reply
#2
You have to insert space before and after a smilie to show the image. That's how SCEditor works.
Reply
#3
They are converted back when you push enter for example... maybe editor bug, it is not mybb related
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#4
(2014-08-19, 08:46 AM)Destroy666 Wrote: You have to insert space before and after a smilie to show the image. That's how SCEditor works.

(2014-08-19, 08:51 AM)Eldenroot Wrote: They are converted back when you push enter for example... maybe editor bug, it is not mybb related

No! Its not editor's bug because this problem occurs while using MyBB Smilie Inserter and There is no problem while using the editor's Smilie Inserter! 

The editor's Smilie Inserter automatically adds space before and after the smilie code and there's no problem.

I mean the MyBB Smilie Inserter must add these spaces too!

Solution:

Open: inc/functions.php

Find:
					$onclick = ' onclick="console.log(MyBBEditor); MyBBEditor.insertText(\''.$smilie['find'].'\');"';


Replace:
					$onclick = ' onclick="console.log(MyBBEditor); MyBBEditor.insertText(\' '.$smilie['find'].' \');"';
Reply
#5
Yes, this solution is a working fix
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#6
Oh ok, it's indeed a bug then.

Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/1268

Thanks for contributing to MyBB!

Regards,
The MyBB Group
Reply
#7
Thank you for your fix - I created a PR - https://github.com/mybb/mybb/pull/1269
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)