[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!
Anti-Spam Guide
Locked
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

[RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

Post by emosbat » Sat Aug 04, 2012 3:50 pm

** please read FIX COMMON PROBLEMS at the end of this post before sending your question about problems **

Modification Name: eMosbat TinyMCE Integration

Author: eMosbat

Modification Description:
TinyMCE WYSIWYG Editor Integration with support of smilies and custom BBCodes.

Modification Version:: 1.5

Requirements: phpbb 3.0.11

Features:
  • support of Smilies.
  • support of custom BBCodes.
  • support of attachment added (1.0.2).
  • support of spellchecker added (1.5.0).
  • support of skin added (1.5.0).
  • support of language added (1.5.0).
  • quick quote feature
  • allow users to select enhanced editor or default editor (1.5.6)
  • automatically detect mobile device (1.5.6)
Screenshots:
ACP:
Image

UCP:
Image

Full Editor:
Image

QuickReply (addon installation needed):
Image

Modification Download: Download Link

Addon: eMosbat's TinyMCE for Quick Reply (in package)

TinyMCE's language packs: Download here

github: https://github.com/eMosbat/eMosbat-Tiny ... -for-phpBB

Contributes: Image Donate:

would you like donate? my bitcoin is 1NEkMQUBCbV73VMZKjTdLREcfgGkWig39M


FIX COMMON PROBLEMS:
these are not bugs, but problems that occurs depend on your board configuration and language so please read them before posting questions.

- if your board language is rather than english or persian
or get error messages like: [phpBB Debug] PHP Notice: in file [ROOT]/includes/acp/acp_emotinymce.php on line 114: Undefined index: eMosbat TinyMCE Integration in acp, you should:


1. copy language/en folder files to your langauge's folder for example for germany copy them to language/de.
2. download your language [b][url=http://www.tinymce.com/i18n/index.php?ctrl=lang&act=download&pr_id=1]package from tinymce.com[/url][/b] and copy it's content to /styles/YOUR_THEME/template/tiny_mce/ folder.


- if you use themes rather than prosilver or subsilver2:

depend on base template of your theme, copy prosilver or subsilver2 content from root/styles/prosilver or root/styles/subsilver2 to your theme folder and apply template changes from MOD detail page to your theme.

- if you use custom bbcodes and would like to have icon,
- or if your browser do not show custom bbcode buttons correctly:

upload 24x24 pixels gif image with same name of custom bbcode to images/bbcodes folder. for example for a custom bbcode with this name: youtube, upload youtube.gif to images/bbcodes folder.

if you see scrambled toolbar button for custom bbcodes you can also disable help tips from acp to fix that but I recommend to add icon for all bbcodes for best result.


- how can I copy-paste from webpages to editor?

it is NOT a html editor. it is BBCode editor so it do not support all html tags. just simple bbcodes! this MOD try to convert most html tags to it's equal bbcodes, but can not convert all type of htmls with lot of css styles. if you get a bad result after a html copy-paste, you should use Remove Formatting button to clean html code after paste or use Paste as plain text button.

- I installed this mod but it doesn't show in theme X (not prosilver base and subsilver base)?

one common reason is that id name of your textarea tag in your theme is different than message. like this example:

<textarea name="message" id="editor" ....

you should look at post editor template file (usually posting_editor.html) and change it to:

<textarea name="message" id="message" ....

or open emotinymce_editor.html and change:

tinyMCE.execCommand("mceAddControl", true, "message");

to:

tinyMCE.execCommand("mceAddControl", true, "INSERT_WHAT_ID_OF_TEXTAREA_IS_HERE");

- I installed this mod in theme X, checked all suggestion you said above. still not load, but works in prosilver!

unfortunately I can not support every theme for this mod, there are several hundred theme that need manually modification to make this mod works, I can support prosilver for this only because of lack of free time :( I suggest you install firebug addon for firefox and see what error you get on that page in console tab of firebug. then tell me that to help you. you should know how to install MODs and how find template problem or tell a designer to find the problem ;)
Last edited by emosbat on Mon Jun 02, 2014 6:53 am, edited 80 times in total.

User avatar
trigger_error
I've Been Banned!
Posts: 200
Joined: Mon Feb 21, 2011 1:27 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by trigger_error » Sat Aug 04, 2012 4:10 pm

Demo?

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

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat » Sat Aug 04, 2012 4:14 pm

trigger_error wrote:Demo?
demo is not ready yet. you may view screenshot.

User avatar
trigger_error
I've Been Banned!
Posts: 200
Joined: Mon Feb 21, 2011 1:27 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by trigger_error » Sat Aug 04, 2012 4:29 pm

Custom BBCodes rendering automatically without any customizing?

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

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat » Sat Aug 04, 2012 4:35 pm

trigger_error wrote:Custom BBCodes rendering automatically without any customizing?
no rendering is not possible without customization but you will have them on toolbar.

User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Re: [BETA] eMosbat's TinyMCE Integration

Post by EXreaction » Sat Aug 04, 2012 5:49 pm

Would it be possible to get custom bbcodes to render with this? Does TinyMCE have that capability?

EDIT: Also, what is the intent of the edit to includes/functions_posting.php?

Find:

Code: Select all

'SMILEY_IMG'	=> $root_path . $config['smilies_path'] . '/' . $row['smiley_url'],
Replace-with:

Code: Select all

'SMILEY_IMG'	=> $board_path . $config['smilies_path'] . '/' . $row['smiley_url'],
This will cause an error as $board_path is not defined.

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

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat » Sat Aug 04, 2012 5:57 pm

EXreaction wrote:Would it be possible to get custom bbcodes to render with this? Does TinyMCE have that capability?
it is depend on what you need to render.
Actually a WYSIWYG editor is limited to render and show images, links and texts.
so if, for example, you want a live youtube in WYSIWYG editor it is not possible.

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

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat » Sat Aug 04, 2012 6:10 pm

edit.

User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Re: [BETA] eMosbat's TinyMCE Integration

Post by EXreaction » Sat Aug 04, 2012 6:24 pm

Have you tested this on 3.1 develop?

We're currently exploring options for WYSIWYG editors for 3.1 and someone mentioned this, so I've been testing it on 3.1 now.

I'm not sure if the few things I'm running into are issues from the changes between 3.0 and 3.1 or if they are bugs.

One thing I did notice (that certain smilies were partially broken when inserted, because it found the first match, even if it was not complete) and was able to fix was with this:
posting_editor.html

Code: Select all

rg = new RegExp(escapeReg("{smiley.A_SMILEY_CODE}"),"g");
replace with

Code: Select all

rg = new RegExp("^"+escapeReg("{smiley.A_SMILEY_CODE}")+"$","g");

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

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat » Sat Aug 04, 2012 6:36 pm

no I didnt tested it on 3.1.
$board_path is a mistake I didn't wrote it on a fresh installation :oops:
I fix it and add your regex suggestion very soon

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

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat » Sat Aug 04, 2012 8:54 pm

ok smiley should works correctly now:

convert_urls should be false!

User avatar
Ali@php
Registered User
Posts: 60
Joined: Fri Sep 09, 2011 11:17 am
Name: Ali Faraji
Contact:

Re: [BETA] eMosbat's TinyMCE Integration

Post by Ali@php » Sat Aug 04, 2012 9:16 pm

Nice mod thanks ;)
There isnt any option to limit usage of some tags like flash, Right ?

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

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat » Sat Aug 04, 2012 9:18 pm

Ali@php wrote:Nice mod thanks ;)
There isnt any option to limit usage of some tags like flash, Right ?
thanks :D
flash button should disapear when you disable flash in admin.

User avatar
Ali@php
Registered User
Posts: 60
Joined: Fri Sep 09, 2011 11:17 am
Name: Ali Faraji
Contact:

Re: [BETA] eMosbat's TinyMCE Integration

Post by Ali@php » Sat Aug 04, 2012 9:20 pm

emosbat wrote:
Ali@php wrote:Nice mod thanks ;)
There isnt any option to limit usage of some tags like flash, Right ?
thanks :D
flash button should disapear when you disable flash in admin.
Then its awesome :D
Please retest your download package its not working for me now

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

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat » Sun Aug 05, 2012 6:10 am

Ali@php wrote:
emosbat wrote:
Ali@php wrote:Nice mod thanks ;)
There isnt any option to limit usage of some tags like flash, Right ?
thanks :D
flash button should disapear when you disable flash in admin.
Then its awesome :D
Please retest your download package its not working for me now
download link has been fixed please try again.

Locked

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