htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0 - Add-Ons:
HtmlArea3 PHP Plugin Based Mod - New version (10-10-03)


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

First page Previous page 1 2 3 Next page Last page  View All


jammjamm
Novice

Sep 11, 2003, 11:38 PM

Post #51 of 72 (15350 views)
Shortcut
Re: [howardh] HtmlArea3 PHP Plugin Based Mod - New version (27-08-03) [In reply to] Can't Post

howardh wrote: "And is there an option to set the HTML so that it will have linebreaks in the HTML code itself as opposed to having everything compressed together?"
--

I figured out how to do this:

1) in core.js change the line (around line 175, in the "Switches editor mode" function)

this._iframe.contentWindow.document.body.innerHTML = "";

to

this._iframe.contentWindow.document.body.innerHTML = "<link rel='stylesheet' href='preform.css' type='text/css'>"; //Makes view source have line breaks in Moz

Then create a file "preform.css" that contains this text

body
{
white-space:-moz-pre-wrap;
}


This will make the source code look pretty good. (You can also change the font or background, etc.) Mozilla messes with the white space when you edit in WYSIWYG, so don't expect to be able to make ASCI-art or anything. Still, it makes things MUCH more readable in Moz.

Hope this helps.


squiz
Novice

Sep 14, 2003, 6:23 PM

Post #52 of 72 (15321 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod - New version (27-08-03) [In reply to] Can't Post

New release of the editor today (15-09-03) to change a bit of look and feel as well as add some additional functionality.

Changes in this release:
  1. Added SOME table editing support. Basically just did the table properties popup. Still probably a bit buggy but it's just in there so I dont forget to do it
  2. Added support for both modal and non-modal dialogs. IE gets to use full modals now but Moz still uses the other semi-modal code I added in there
  3. Changed all the toolbar icons to a light on dark look. Thinking about adding support for themes into the editor because I'm sure everyone will be wanting their own toolbar images and stylesheets. Shouldn't be too hard if anyone wants to take this up


Remember to clear you cache if viewing the new version on the demo site or your own as changes have been made to the cached JS include files.

Greg


squiz
Novice

Sep 25, 2003, 7:47 PM

Post #53 of 72 (15237 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod - New version (15-09-03) [In reply to] Can't Post

New release of the editor today (26-09-03) to add table editing and button drop down functionality.

Changes in this release:
  1. Added the rest of the table editing support I left out of the previous version. Also added in a "Show 0 Borders" buttons which is still a little buggy. Turn it off in the table editing plugin if you dont want it. It does work but it messes with the cell borders (if your using them) and doesnt turn off when saving.
  2. Added support for menus of buttons. This is being used to turn the large number of buttons for table editing into something more managable (5 buttons in total). The menus are easy to setup in the PHP plugin file (see table editing for eg) and can be used to group any buttons. Does not work with drop-downs yet.
  3. Added a new plugin for HTML Tidy. This plugin will tidy the html produced by the editor to make it as close to XHTML compliant as it can. You need to have HTML Tidy installed on your machine and will have to edit the PHP plugin file to set up the path to HTML Tidy. Any questions - talk to me and I'll help you set it up (give it a go first though - its pretty easy).


Remember to clear you cache if viewing the new version on the demo site or your own as changes have been made to the cached JS include files.

Greg


teddyalf
New User

Oct 5, 2003, 5:47 AM

Post #54 of 72 (15150 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod - New version (26-09-03) [In reply to] Can't Post

hi, how can i submit the content? i don't see any $_POST useful..



tnx!

Laugh


(This post was edited by teddyalf on Oct 5, 2003, 6:29 AM)


squiz
Novice

Oct 5, 2003, 7:36 PM

Post #55 of 72 (15135 views)
Shortcut
Re: [teddyalf] HtmlArea3 PHP Plugin Based Mod - New version (26-09-03) [In reply to] Can't Post

$_POST in PHP is a global var available that contains all data posted in the form if the form is posted with the method POST. If it is posted by the method GET then all the data will be in the global PHP var $_GET (sorry if you know this).

So if you have a form like this:
<form method="post">
(PHP CODE HERE)
</form>

and the name of the editor is "myEditor" then the HTML will be in the var $_POST['myEditor'].

Greg


squiz
Novice

Oct 9, 2003, 9:37 PM

Post #56 of 72 (14879 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod - New version (26-09-03) [In reply to] Can't Post

New release of the editor today (10-10-03) to add spell checker functionality.

Changes in this release:
Added a new spell checker plugin based on a couple of different ones floating around. It uses pspell and XML_HTMLSax to do the spelling.

I've also updated the demo page [http://dev.squiz.net/~gsherwood/htmlarea]

Remember to clear you cache if viewing the new version on the demo site or your own as changes may have been made to the cached JS include files (can't remember).

Shout-outs to Marc Mcintyre <mmcintyre@squiz.net> for doing most of the work on the spell checker plugin.

Greg


nikotto
User

Oct 15, 2003, 4:40 AM

Post #57 of 72 (14827 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod - New version (26-09-03) [In reply to] Can't Post

hey squiz!
i really like this php-class it is exactly what i need!
but my main problem is that it is a complete hack of the original htmlarea and if htmlArea has a new good feature your class doesn't have it!
ofcourse there are too features like htmltidy that should be moved form your class to the original htmlArea :D

i really would need the ImageManager - and this is not avaliable for this class :(

BUT: when you say you will continue developing this class and always moving the new features to your class then this would be great!
and i could help you too doing this :D

perhaps it would be a good idea to start a new project on sourceforge.net!

btw: your idea with the plugin-interface is really good - it sucks if you have to hack for everything the main-code!

mfg


squiz
Novice

Oct 15, 2003, 4:46 PM

Post #58 of 72 (14797 views)
Shortcut
Re: [nikotto] HtmlArea3 PHP Plugin Based Mod - New version (26-09-03) [In reply to] Can't Post

Hacking the code so much was my biggest fear, but it is something I had to do to ensure that the plugin system was written in PHP rather than in JS. Most of the techs at my work that will develop plugins for it dont want to have to learn JS to do it. They already know PHP so I went for that.

I converted over the table editing and spell checker plugins from HTMLArea and I think they came out quite well. The use of drop-down DHTML menus for table editing functions cleaned up the toolbar a fair bit too.

Having said this, I cant check the latest CVS version for new functionality as often as I'd like so if you or anyone else could help out with keeping it up to date it would be a great help. I have done it before when I put in the status bar and it really wasnt that hard. The functions are still quite similiar, they are just in different places.

If you really do want to help out, send me an email (greg@squiz.net) and we'll sort out what you want to do. I'm currently not developing any new functionality, just fixing bugs. I've also got some fixes and plugins from other developers that I still need to put in as well - so I might need help with them too.

Greg


wonderdog
New User

Jan 17, 2004, 3:32 AM

Post #59 of 72 (14183 views)
Shortcut
Please help with error message - plugin [In reply to] Can't Post

Help!. Au secours! Hilfe!

So far I'm just trying to test index.php (the example page) in a different directory than the one that holds the scripts.

I've almost got it running, but get the following error:

Fatal error: Failed opening required '//plugins/format_text/format_text.inc' (include_path='./:/usr/local/lib/php') in http://www.d-squared.com/htmlareaphp/wysiwyg.inc on line 1145

I've changed the beginning PHP code of index.php to:

<?php
error_reporting(E_ALL);
include_once('http://www.d-squared.com/htmlareaphp/wysiwyg.inc');
?>

and also edited the URL to the stylesheet.

I don't see any other places to make changes - and I assume that the wysiwyg.inc file does not require modification...

the page with the error can be seen at http://d-squared.com/news3/index.php

PHP newbie - please be gentle...

Dave


wonderdog
New User

Jan 18, 2004, 4:09 AM

Post #60 of 72 (14170 views)
Shortcut
Error resolved > new issue > editing textarea [In reply to] Can't Post

I resolved the problem by keeping all files in the same directory - I assume there's another way but I don't see it.

MY NEW problem, and this is my reason for using HTMLAREA in the first place, is how to configure it for this PHP code, which updates a txt file using TEXTAREA. Any help at all would be very much appreciated:

<?php
// the file in subject
$file = "mytext.txt";

// check for HTTP POSTS
if($HTTP_SERVER_VARS['REQUEST_METHOD'] == 'POST') {
// open the file for writing
$fp = fopen($file, "w");

// write the data in
fwrite($fp, $list_ip);

// close the file
fclose($fp);
}

// open the file for reading
$fp = fopen($file, "r");

// read in the file content
$contents = fread($fp, filesize($file));

// close the file
fclose($fp);
?>

<FORM METHOD="post" ACTION="<?php echo $PHP_SELF; ?>">
<TEXTAREA NAME="list_ip" COLS="30" ROWS="12">
<?php echo htmlspecialchars($contents); ?>
</TEXTAREA>
<INPUT TYPE="submit" VALUE="Update File's text">
</FORM>


squiz
Novice

Jan 18, 2004, 4:05 PM

Post #61 of 72 (14158 views)
Shortcut
Re: [wonderdog] Error resolved > new issue > editing textarea [In reply to] Can't Post

I've created an example for reading and writing to/form a file using the WYSIWYG editor. You can find the example at http://dev.squiz.net/~gsherwood/htmlarea/examples/file.php

Note that this example is also located in a different directory from the wysiwyg.inc file and so passes in the web path '../' to indicate that the WYSIWYG editor needs to look back a directory for all its files.

Greg


wonderdog
New User

Jan 19, 2004, 2:56 AM

Post #62 of 72 (14149 views)
Shortcut
Re: [squiz] Error resolved > new issue > editing textarea [In reply to] Can't Post

Excellent app! Works great and it's exactly what I need.

Thank you very much.

Dave


tonyk
Novice

Jan 21, 2004, 10:07 PM

Post #63 of 72 (14098 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod - New version (10-10-03) [In reply to] Can't Post

Nice piece of work!! I would l like to use it in a multi template CMS that I'm writing. A question I have is how can apply the common class that I use for template content area to the editor div through an external css file. I use the identifier .content (pretty original huh). Tommorrow I'll try to re-write some of the code I have been using into plugins. I'll post anything that might be of universal interest. Thanks again


tonyk
Novice

Jan 30, 2004, 12:59 PM

Post #64 of 72 (13943 views)
Shortcut
New image_ insert module for squiz's mod [In reply to] Can't Post

This is a rewritten image_insert plugin for squiz's mod. Hopefully it will plug one of the very few shortcomings of the original. Thank you squiz.

To install just unzip in your plugins directory (you might want to change the name of the existing image directory so you don't over write it.) You have to edit the config.inc file to reflect the url to your servers image directory and the absolute path to your image directory.

Changes from the original:

Previews images from your server image directory as well as your local machine.

Uploads images from your local machine to your image directory.

Automaticaly determines image height and width and inserts into your script.

enjoy

Attachments: insert_image.zip (5.26 KB)


tonyk
Novice

Feb 1, 2004, 2:13 PM

Post #65 of 72 (13903 views)
Shortcut
Re: [tonyk] New image_ insert module for squiz's mod [In reply to] Can't Post

After I finished uploading the image_insert I tested some more realized that it did not work properly in Mozilla. It turns out that Mozilla for some reason wasn't firing the onChange event in the file upload input. I hacked a work around and got it working. I also redid the interface to make it a little more coherent and a few other minor things.
Attachments: insert_image.zip (5.49 KB)


squiz
Novice

Feb 1, 2004, 3:38 PM

Post #66 of 72 (13901 views)
Shortcut
Re: [tonyk] New image_ insert module for squiz's mod [In reply to] Can't Post

Excellent, the insert link and insert image plugins are some of the most neglected in the mod because I have written new ones for the CMS I'm working on. I dont actually use the included ones at the moment so Im glad that someone is working on them. With the improvements, it might be an option to use them now.


tonyk
Novice

Feb 2, 2004, 7:50 AM

Post #67 of 72 (13888 views)
Shortcut
Re: [tonyk] New image_ insert module for squiz's mod [In reply to] Can't Post

Oops! I seem to have left out the call to __dlg_init(); in the init() function. Included it in attached filed. Squiz; the next thing I'm going to do is to rework the insert_links. Nothing fancy just make a Moz dialog similar to MS. Speaking of dialogs, my dialogs always end up under the main window in Moz. Is this this normal or is in a setting in Moz. I must admit that the only time I use Moz is for testing. if it is normal behavior is there any way to programaticly keep them on top?
Attachments: insert_image.zip (5.49 KB)


leonard
New User

Feb 28, 2004, 7:34 PM

Post #68 of 72 (13529 views)
Shortcut
Re: [wonderdog] Please help with error message - plugin [In reply to] Can't Post


In Reply To
Help!. Au secours! Hilfe!

So far I'm just trying to test index.php (the example page) in a different directory than the one that holds the scripts.


Hi All.

I've just started using this ...fork... of htmlArea. I've used various 'official' versions in the past, but it was a pain to push the bits of JS all over the HTML from inside a PHP framework... so... here I am.

Anyway, I had the same problem as wonderdog. I couldn't use htmlarea from scripts in a different directory. Perhaps I was doing something wrong, but the fix that worked for me was to create this function in wysiwyg.inc:

Code
function set_web_path ($web_path='') 
{
$this->web_path = $web_path;

}//end set_height()


And add the last line of this snippet to the calling php script, e.g.:


Code
$wysiwyg->set_stylesheet('/~gsherwood/htmlarea/styles.css');	$wysiwyg->set_width('100%'); 
$wysiwyg->set_height('400');
$wysiwyg->set_web_path('/htmlarea/');


It looks like the code was already built with this in mind... so it was easy once I backtracked through the code. I've still got to test it a bit more, but it appears to work.

Have a good one!

LC

Update:

I've been working a little more on this... I've started capturing the output with a PHP output buffer, and then running it all through the PEAR template engine. I had to escape all of the "$" signs in the Javascript because the template engine ate the $1, $2, etc. (at least I think it was the template engine). I hope this note comes in handy for someone else down the line!

Great tool... really great.


(This post was edited by leonard on Feb 29, 2004, 12:42 AM)


squiz
Novice

Mar 3, 2004, 3:42 PM

Post #69 of 72 (13448 views)
Shortcut
Re: [tonyk] New image_ insert module for squiz's mod [In reply to] Can't Post

Mozilla doesnt have modal diaglogs (I think this is what your asking) so all popups cant be told to remain on top all the time (as in IE). I used some JS code to *try* and replicate this modal state, but the code is really not that good at doing it.

If you or anyone else can find or write some better code, it would really improve the editor.


aeon
User

Mar 4, 2004, 1:51 PM

Post #70 of 72 (13433 views)
Shortcut
Re: [squiz] New image_ insert module for squiz's mod [In reply to] Can't Post

Hi Squiz

Can you point me at some code segments to show how you do dialogs at present? I'm struggling with this too.

Thanks


squiz
Novice

Mar 4, 2004, 3:38 PM

Post #71 of 72 (13428 views)
Shortcut
Re: [aeon] New image_ insert module for squiz's mod [In reply to] Can't Post

The current modal code is in code/dialog.js
I dont think its complete, but there is a URL in there from where I read about the code.
I think I may have since taken most of it out because it didnt really work well, but that is a good place to start.


aeon
User

Mar 5, 2004, 11:21 AM

Post #72 of 72 (13350 views)
Shortcut
Re: [squiz] New image_ insert module for squiz's mod [In reply to] Can't Post

I took a look in dialog.js but my javascript is not up to the task Unsure

I got as far as generating a dialog with a call to Dialog("test.htm", action, init); but am not clear how to then pass anything useful in action and init or get anything back to use on the page or wrap up before writing to the page with something like editor.surroundHTML("<font>", "</font>");

I wonder if that LaTEX documentation project is coming on?

First page Previous page 1 2 3 Next page Last page  View All
 
 


Search for (options)