[RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
Locked
User avatar
nilanko
Registered User
Posts: 133
Joined: Sun Apr 21, 2013 7:32 pm
Location: Earth
Name: Nilanko Halder

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by nilanko »

emosbat wrote:yes you are right, do not load not-cached images! but it is there if click preview, show it.
it could be a bug from tinymce because I didn't changed tinymce image plugin codes.
Oh I see. But you'll see that this problem is not there when using other browsers! Images load instantly in FF and even in IE8 even if they are not cached! Weird.

I was trying to find an alternative. What I am trying to do is to remove the default "Insert image" button and add my own BBCODE for image insertion.

So, I added the BBCODE [myimg]{URL}[/myimg] and the HTML replacement as <img src="{URL}" alt="">

But when I use this custom code, there is extra space inserted between [myimg] and [/myimg] tags like this:

[myimg] http://abc.com/image.png [/myimg] (Note the space after [myimg] and before [/myimg])

This custom code does not work until I manually remove the 2 extra spaces. These extra spaces are also inserted with tags such as FLASH, CODE, LIST, etc.

So my questions:

1. How can I remove those extra spaces so that users don't have to manually remove them?
2. How to remove the default Insert image button?

User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by emosbat »

I added those spaces for some reason. if you remove them, smiles not works correctly. its from tinymce that not working well in chrome. maybe next version of tinymce removed this bug and when we update to next version it should works fine. for now you can tell chrome users to disable advanced editor from their ucp.

User avatar
nilanko
Registered User
Posts: 133
Joined: Sun Apr 21, 2013 7:32 pm
Location: Earth
Name: Nilanko Halder

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by nilanko »

Yes I know that smilies wont work if the spaces are removed but can you please tell me how to remove them? There's an easy workaround - just change the code for each smiley and add the spaces to the smiley codes itself. So please tell me the way to remove the spaces you have added.

Also tell me how to remove the default image insert button. Thanks.

User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by emosbat »

you can remove space in emo_tinymce.js, in insert_bbcode function, at this line:

ed.selection.setContent(open+oldcnt+(caret==false?' <span id="__caret">_</span> ':'')+close);

and image button from emotinymce_editor.html:

theme_advanced_buttons1 : "code,fullscreen,bold,italic,underline,<!-- IF S_BBCODE_URL -->link,unlink,<!-- ENDIF --><!-- IF S_BBCODE_IMG -->image,<!-- ENDIF -->cut,copy,paste,pasteword,pastetext,removeformat,undo,redo,fontsizeselect,forecolor<!-- IF EMOTINYMCE_SPELLCHECKER -->,spellchecker<!-- ENDIF -->",

User avatar
nilanko
Registered User
Posts: 133
Joined: Sun Apr 21, 2013 7:32 pm
Location: Earth
Name: Nilanko Halder

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by nilanko »

Thank you so much for your support.

User avatar
nilanko
Registered User
Posts: 133
Joined: Sun Apr 21, 2013 7:32 pm
Location: Earth
Name: Nilanko Halder

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by nilanko »

Hey can you help me a bit further? I have removed the spaces from the part of code you mentioned. Now when I press a button, no spaces are added but if I select some text and then press a button to apply bbcode to that text, spaces are still added at the begining and end of the selected text. How can I stop this from happening?
Last edited by nilanko on Sat May 25, 2013 6:15 pm, edited 1 time in total.

User avatar
nilanko
Registered User
Posts: 133
Joined: Sun Apr 21, 2013 7:32 pm
Location: Earth
Name: Nilanko Halder

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by nilanko »

Sorry for quadruple posts.
Last edited by nilanko on Sat May 25, 2013 6:16 pm, edited 1 time in total.

User avatar
nilanko
Registered User
Posts: 133
Joined: Sun Apr 21, 2013 7:32 pm
Location: Earth
Name: Nilanko Halder

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by nilanko »

Sorry for quadruple posts.
Last edited by nilanko on Sat May 25, 2013 6:16 pm, edited 1 time in total.

User avatar
nilanko
Registered User
Posts: 133
Joined: Sun Apr 21, 2013 7:32 pm
Location: Earth
Name: Nilanko Halder

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by nilanko »

Sorry for quadruple posts.

User avatar
nilanko
Registered User
Posts: 133
Joined: Sun Apr 21, 2013 7:32 pm
Location: Earth
Name: Nilanko Halder

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by nilanko »

I have replaced tinymce with the latest stable version 3.5.8 - it works but still has the image insertion bug in Chrome only. The newer version 4.0 DOES NOT have this bug anymore but when I replaced the file with the v4 files, the mod stopped working.

Emosbat, can you help me with integrating tinymce v4 with phpbb3? It does not seem to have any bugs like the previous version, therefore I ask.

I wish I could code but I'm so illiterate in that field! :(

s1r0n
Registered User
Posts: 7
Joined: Fri May 10, 2013 12:27 pm

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by s1r0n »

does somebody have a set of 24by24 images for the bbcode for this plugin? the editor seems rather bare without these icons

actually no, I think there is a problem with the editor. none of the icons show up, the Bold, Underline, etc. icons that are supposed to appear at the top of the editor are all missing. i checked the HTML code and the code is there, but the display is set to off. style="display:none;" how to I turn on the display of those icons?

User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by emosbat »

nilanko wrote:I have replaced tinymce with the latest stable version 3.5.8 - it works but still has the image insertion bug in Chrome only. The newer version 4.0 DOES NOT have this bug anymore but when I replaced the file with the v4 files, the mod stopped working.

Emosbat, can you help me with integrating tinymce v4 with phpbb3? It does not seem to have any bugs like the previous version, therefore I ask.

I wish I could code but I'm so illiterate in that field! :(
sorry but it is not one line code to tell you fix it. I will work on this issue when I get a free time. until, you may tell your members to do not use chrome or disable advanced editor if they use chrome.
s1r0n wrote:does somebody have a set of 24by24 images for the bbcode for this plugin? the editor seems rather bare without these icons

actually no, I think there is a problem with the editor. none of the icons show up, the Bold, Underline, etc. icons that are supposed to appear at the top of the editor are all missing. i checked the HTML code and the code is there, but the display is set to off. style="display:none;" how to I turn on the display of those icons?
make sure you installed mod correctly and also installed your language file.

stewejazz
Registered User
Posts: 30
Joined: Tue Apr 16, 2013 10:19 pm

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by stewejazz »

hi!

I need help for a question.
When i want to change a topic, i press on the "modify" text button, for a few moments i have this:
Image

After that i have the normal editor.
I wish that the editor displays immediately how can i do?

User avatar
nilanko
Registered User
Posts: 133
Joined: Sun Apr 21, 2013 7:32 pm
Location: Earth
Name: Nilanko Halder

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by nilanko »

stewejazz wrote:hi!

I need help for a question.
When i want to change a topic, i press on the "modify" text button, for a few moments i have this:
Image

After that i have the normal editor.
I wish that the editor displays immediately how can i do?
The editor takes time to load since scripts have to be downloaded, executed and then rendered. This generally can't happen instantaneously.

exma
Registered User
Posts: 46
Joined: Tue May 26, 2009 6:26 pm

Re: [RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by exma »

Hello,

I have a big problem with smiles when users quote some message all users see half URL code and not a smile.

How can I fix this?

Locked

Return to “[3.0.x] MODs in Development”