[BETA] WYSIWYG - Rich Text Editor for posting HTML message

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! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
s.latif
Registered User
Posts: 81
Joined: Thu Mar 29, 2007 8:17 pm

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by s.latif »

can anybody help??

User avatar
eCardMax.com
Registered User
Posts: 61
Joined: Thu Jan 01, 2004 11:10 am
Contact:

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by eCardMax.com »

vic2007 wrote:Hi,

I have a request - how do I make WYSIWYG Mode to be switched off as default for all, ofcourse members who want to use this can switch it on by clicking on 'Switch on/Off WYSIWYG Mode' ? :?:
-->Edit file richedit/editor.js
FIND
//If no cookie is set, which editor (BBcode or RichText) you want user to see first?
//Enter 1 for RichText editor - Enter 0 for BBcode editor
var show_mode_editor = "1";

REPLACE WITH
var show_mode_editor = "0";
boardsource wrote:im having some trouble with this editor, any time a thread is edited or i preview a thread, the code that was in the wysiwyg editor isnt there anymore. cant figure out if i did something wrong or if that feature just isnt included
--> I suggest you guys download Beyond Compare program to compare phpbb original script files with Hoteditor MOD script files then you will see a missing code.
Download Beyond Compare here http://ecardmax.com/beycomp.exe
Dogs and things wrote:Your editor is very nice. ;)

But I have a question:

- What is that last line in the editor.js, it´s many thousands of caracters long and it can´t be edited, what´s it´s function.
-->The editor.js source code was compressed to reduce filesize, sorry you can't edit it
vic2007 wrote:hi,
the mod is great but I have a feature request ---- is there someway to remove formatting when pasting from, let's say, a word document ?
ta,
vic
-->Thanks for your suggestion. We will try to make it happen in the next version
There is no possibility to make two or more instances of editor work properly on one page in forms.
Here is the demo to show you how to display 2Hoteditor in 1 page
http://www.ecardmax.com/hoteditor/index_2editors.html (view HTML Source code to find out or visit http://www.ecardmax.com/ehelpmax/download.php to download Hoteditor stand alone zip file and look at the demo in there (click to download title: HotEditor - WYSIWYG V4.2 - Stable version (June 01, 2007) - Works in Safari 1.3.2 or higher.)
s.latif wrote:hi !why is mine coming out like this??
-->I think the table code is broken - missing <tr> or <td> tag - download Beyond Compare to find out what missing.

emma1989
Registered User
Posts: 121
Joined: Sun Jan 28, 2007 11:51 am
Location: Croydon, London
Contact:

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by emma1989 »

This mod (latest version :D )works really great, however it seems incompatible with this mod...
http://www.phpbb.com/community/viewtopic.php?t=398193

This mod shortens URLS.

When the modifications that hoteditor makes in bbcode.php are removed, URL shortening works again.

Does anyone know a quick fix so that I can make it work with this...
http://www.phpbb.com/community/viewtopic.php?t=398193

The Edits Auto Shorten URLs mod makes to bbcode.php are:
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php

#
#-----[ FIND ]------------------------------------------
#
$replacements[] = $bbcode_tpl['url1'];

#
#-----[ REPLACE WITH ]------------------------------------------
#
$replacements[] = '\\1'; //$bbcode_tpl['url1'];//Autoshorten URL MOD v1.0.4

#
#-----[ FIND ]------------------------------------------
#
$replacements[] = $bbcode_tpl['url2'];

#
#-----[ REPLACE WITH ]------------------------------------------
#
$replacements[] = '\\1'; //$bbcode_tpl['url2'];//Autoshorten URL MOD v1.0.4

#
#-----[ FIND ]------------------------------------------
#

function make_clickable($text)
{

#
#-----[ AFTER, ADD ]------------------------------------------
#
global $board_config;

#
#-----[ FIND ]------------------------------------------
#
$ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);

#
#-----[ REPLACE WITH ]------------------------------------------
#
//Autoshorten URL MOD v1.0.4
$url_meat = "\w\#$%&~/.\-;:=,?@\[\]+";
$max_url_length = $board_config['max_url_length'];
if ($max_url_length < 40) $max_url_length = 40; // prevent silly ACP setting from doing harm
$prefix_length = $max_url_length - 20; // leave a 20 character tail
$suffix_length = $max_url_length - $prefix_length - 3; // -3 for "..." in the middle
$patterns[] = "#(^|[\n ])([\w]+?://[" . $url_meat . "]{1," . $max_url_length . "})($|[^" . $url_meat . "])#is";
$replacements[] = "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>\\3";
$patterns[] = "#(^|[\n ])([\w]+?://[" . $url_meat . "]{" . $prefix_length . "})([" . $url_meat . "]+)([" . $url_meat . "]{" . $suffix_length . "})($|[^" . $url_meat . "])#is";
$replacements[] = "\\1<a href=\"\\2\\3\\4\" target=\"_blank\">\\2...\\4</a>\\5";
$ret = preg_replace($patterns, $replacements, $ret);

#
#-----[ FIND ]------------------------------------------
#
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);

#
#-----[ REPLACE WITH ]------------------------------------------
#
//Autoshorten URL MOD v1.0.4
$patlazy[] = "#(^|[\n ])((www|ftp)\.[" . $url_meat . "]{1," . $max_url_length . "})($|[^" . $url_meat . "])#is";
$replazy[] = "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>\\4";
$patlazy[] = "#(^|[\n ])((www|ftp)\.[" . $url_meat . "]{" . $prefix_length . "})([" . $url_meat . "]+)([" . $url_meat . "]{" . $suffix_length . "})($|[^" . $url_meat . "])#is";
$replazy[] = "\\1<a href=\"http://\\2\\4\\5\" target=\"_blank\">\\2...\\5</a>\\6";
$ret = preg_replace($patlazy, $replazy, $ret);

There are no clashes in editing... it just doesnt work, as I say, when modifications hoteditor makes are removed - it works.

Any ideas?
Emma - phpBB forum owner - consider me a "noob" :?

A good friend of mine is looking for phpBB Developers / Gurus for major new phpBB based project - check it out if you're interested! :)

purpleaxe
Registered User
Posts: 38
Joined: Sat Feb 10, 2007 1:18 am

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by purpleaxe »

Hello,

I think there's no way because , in HotText Editor when you post any url link, it's auto change to html code like that

Code: Select all

<a href="http://test.com">test</a>
So it should be in one way, it's with custom BBcode, you create a custom bbcode like [shurl][/shurl] then, add a custom bbcdoe button in HotText Editor. Hope it will be work. (Never test yet) . Just a logic.

Thanks.

emma1989
Registered User
Posts: 121
Joined: Sun Jan 28, 2007 11:51 am
Location: Croydon, London
Contact:

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by emma1989 »

Well hey I got it to work (somehow) :) It was pretty simple in the end I just played with the HTML output!

Anyway
A bigger issue.

This mod does not appear to work with attachment mod (many people use this as it is one of the most if not the most popular mod for phpBB 2). This is a very major issue - when you press upload the page refreshed and nothing uploads. Its defiantly a conflict.

Does anyone have a fix?

Thanks :)

Emma xx
Emma - phpBB forum owner - consider me a "noob" :?

A good friend of mine is looking for phpBB Developers / Gurus for major new phpBB based project - check it out if you're interested! :)

endomilik
Registered User
Posts: 144
Joined: Sat Jun 19, 2004 10:54 pm
Contact:

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by endomilik »

can u add a "Spoiler" bbcode....

where there a box in then the message will be inside the frame ? if the user click "Show Spoiler" it will show the spoiler...

something like that -.-

ace2ace
Registered User
Posts: 364
Joined: Sat Aug 14, 2004 3:48 pm

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by ace2ace »

I had the old version 3.
But I have so much data I cannot un-install it.
I manage to install this one version 4. I can post messages but I have a problem with the links for instance I get:

Code: Select all

document.write(cnnRenderT1TimeStamp(1185588007725));News helicopters collide, killing all aboard
Fourpeople were killed Friday afternoon when helicopters from two rival TVnews stations in Phoenix, Arizona, collided while shooting a policechase, according to fire and station officials. full story
and the color. I get:

Code: Select all

COLOR=#NaNNaNNaN][FONT=Verdana]
while in Reach editor mod.

I really want to move to this new version. I am willing to convert my databa #ops to the new tags.
Can you help?
thanks.

aghaby
Registered User
Posts: 191
Joined: Tue May 16, 2006 10:03 pm

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by aghaby »

is it available for working to other Styles except subsiver

like Morpheus or Extreme styles ????

i need a reply to that please

thanks

User avatar
p4plus2
Registered User
Posts: 140
Joined: Sat May 26, 2007 5:06 am

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by p4plus2 »

This is definatly a MOD I will be waiting for to hit the MOD DB :D good luck

~p4plus2~
My lo-fi version of phpbb MOD

Help the Dial up users, give them a chance! :D

Shaharacli
Registered User
Posts: 2
Joined: Fri Aug 10, 2007 11:46 am

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by Shaharacli »

helllo
i'v installed hoteditor-mod wich make the editor WYSIWYG.
that really cool editor, but when i'm doing EDIT message i see the HTML tags

instead of seeing BOLD TEXT i see <b>BOLD TEXT</b>
someone can help me ? maybe i did smthing worng


thanks.

saz3rx
Registered User
Posts: 181
Joined: Wed Jul 18, 2007 3:22 pm

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by saz3rx »

Does it allow us to add our own BBcodes??

independent7
Registered User
Posts: 1
Joined: Fri Aug 10, 2007 8:02 pm

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by independent7 »

I don't use the subsilver template and it's telling me to edit lines in the overall_header.tpl that aren't in our overall_header.tpl. Any help?

ace2ace
Registered User
Posts: 364
Joined: Sat Aug 14, 2004 3:48 pm

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by ace2ace »

no answer yet?
Can anyone help with the color or the documentwrite function?

ace2ace
Registered User
Posts: 364
Joined: Sat Aug 14, 2004 3:48 pm

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by ace2ace »

The font, Size, Color, Highlight comboboxes do not work.
all looks good in the Rich Editor Window. But when I click Submit or Preview, here is what it displays:

Code: Select all

go to [HIGHLIGHT=#ffff00]jail[/HIGHLIGHT]
[color=#ff0000]don't collect 200[/color]
go directly to [size=5]jail[/size]
and [FONT=Century Gothic]what a[/FONT] bout the font?
What change am I missing here?

callit
Registered User
Posts: 6
Joined: Sat Mar 31, 2007 8:13 pm
Location: Switzerland

Re: [BETA] WYSIWYG - Rich Text Editor for posting HTML message

Post by callit »

I think this has not been discussed here so far:

When clicking on a link (in a posted message or in the preview), in any non-modified phpBB2 forum the link by default will open in a new window (target="_blank") which makes sense.
(Who would like to get replaced the forum window with for example a picture a user linked to? Nobody I guess, but maybe I'm wrong ;) ).

But after installing HotEditor 4.2, posted links will open in the same window. :cry:

I had to crawl through the "modifications" (= Hoteditor_Mod.txt) and finally could fix it.
As it is not a huge MOD at all luckily it was not too difficult.

You can fix it like this:
  • Open bbcode.php with a php editor or "WordPad"

  • FIND:

    Code: Select all

       $patterns[] = "#\[url=(.*?)\]#si";
       $replacements[] = '<a href="$1">';
    
       $patterns[] = "#\[url\](.*?)\[\/url\]#si";
       $replacements[] = '<a href="$1">$1[/url]';
  • REPLACE WITH:

    Code: Select all

       $patterns[] = "#\[url=(.*?)\]#si";
       // $replacements[] = '<a href="$1">';
       $replacements[] = '<a href="$1" target="_blank">';
    
       $patterns[] = "#\[url\](.*?)\[\/url\]#si";
       // $replacements[] = '<a href="$1">$1[/url]';
       $replacements[] = '<a href="$1" target="_blank">$1[/url]'; 
  • Save bbcode.php and upload it with ftp to your /forum/includes/
When you're done, posted URLs will open in a new window.
I hope this will help other users too.

Maybe even ecardmax.com would like to design the MOD like this in future versions which might increase the acceptance of HotEditor throughout the world ;)

Post Reply

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