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


squiz
Novice

May 4, 2003, 6:57 PM

Post #1 of 72 (13418 views)
Shortcut
HtmlArea3 PHP Plugin Based Mod - New version (10-10-03) Can't Post

UPDATE: New release attached (10-10-03). Full details are posted on this forum.

I've taken htmlArea3 and split it up into PHP classes while working on a content management system. All the JS has been split up into a plugin based system to allow developers to provide stand-alone functionality that can be easily integrated into an editor.

I've changed quite a few thing in the process. Full details can be found on the demo page (2 HtmlAreas on this page).

Demo is here [dev.squiz.net/~gsherwood/htmlarea/] with zip file containing source (also attached to post).


(This post was edited by squiz on Oct 9, 2003, 9:38 PM)
Attachments: htmlarea.zip (96.9 KB)


schorhr
User

May 5, 2003, 4:30 AM

Post #2 of 72 (13362 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

This is very usefull, thanks!

Now add some other open source editors (java or flash based for example, see a older thread about old IE versions) and there would be the ultimative wysiwyg & browser-independant Editor-Plugin for PHP.


AlRashid
Novice

May 6, 2003, 3:38 AM

Post #3 of 72 (13297 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

Great work, finally someone manage to introduce some unified file structure for all mods and plugins. Using your demo (index.php) I've found a bug while changing font, formating etc. When you have the cursor somwhere in the text (but no text is selected) and you try to change actual font/format etc. the cursor position is lost and no changes are applied. Tested on IE6 and Mozila 1.3.


squiz
Novice

May 6, 2003, 3:55 AM

Post #4 of 72 (13267 views)
Shortcut
Re: [AlRashid] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

Thanks for the kind words and the report. I havnt been able to replicate this bug in Mozilla 1.3 but have been able to in IE6.

I'll take a look into this when I get some free time. I'm pretty flat out at the moment.


Jostein
New User

May 7, 2003, 11:33 AM

Post #5 of 72 (13221 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

Is it possible to use divs instead of iframes for Mozilla too? It just makes much more sense to use divs as the editor area then inherits all styles etc. from the web page it's used on. Now I have to specify a css file explicitly... Also, since Mozilla is using iframes the editor area is not the same doctype as the web page itself... etc. etc..

So how about it? Is it possoble to have Mozilla use divs instead of iframes, like IE can?


squiz
Novice

May 7, 2003, 4:32 PM

Post #6 of 72 (13204 views)
Shortcut
Re: [Jostein] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

It could be changed to use DIVs in Mozilla. The only reason it doesnt is because Mozilla would not resize them properly for me and IE was. This may have changed with further changes I made to it, so I'll give it a go and see if it resizes, otherwise I'm not fussed myself.

What I was really going for was not to select DIV or iFrame but rather to just have a resizing editor/toolbar that could be used inline and in a popup window.


Jostein
New User

May 7, 2003, 6:34 PM

Post #7 of 72 (13195 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

I'm trying to use the editor on both HTML 4 and XHTML documents. If the editor would use divs instead of iframes it would inherit both the doctype and all css files attached to or embedded in the document. It would make the editor the most adaptive editor I've ever seen! That again would also make it dead easy to use on all kinds of documents. I guess you get my point. :P

I noticed the toolbar gets really messed up in Mozilla when used in an XHTML (or standards compliant) document. The icons are all over the place. I've been looking into it a little... Maybe just need some css tweaking? Unfortunately my JavaScript skills are not what they should be...


squiz
Novice

May 7, 2003, 6:41 PM

Post #8 of 72 (13192 views)
Shortcut
Re: [Jostein] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

Yeah, I totally get your point and I think its a good one. It just wasnt my initial goal when making my changes. I WILL try to fix it up when I ge time because I would realy love to use DIVs instead of iFrames myself (it would suit the CMS much better).

As for the toolbar, I must admit that I never tried it in and XHTML document, but this is very important to the work I'm doing so I'll need to fix that if you cant get it going. My skills are up to scratch myself but I will have the time to learn when I finish the project I'm on now.


Jostein
New User

May 7, 2003, 6:43 PM

Post #9 of 72 (13190 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

Also.. I would just like to say that you've done a great job on improving the editor, especially for us PHP folks! :)

Nothing to add in the header.. nothing to onLoad in the body tag. And the simple plugin arrangement.. Just great! :)

(Kissing ass to make you improve it further hehe) :p

I'm relearning JavaScript right now, in hope that I can help in any way...


mimir
Novice

May 26, 2003, 5:15 AM

Post #10 of 72 (12933 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

Why produced code is old HTML instead new XHTML (like "classic" HtmlAREA 3a)?

Regards


(This post was edited by mimir on May 26, 2003, 8:09 AM)


Jostein
New User

May 26, 2003, 1:13 PM

Post #11 of 72 (12899 views)
Shortcut
Re: [mimir] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

Because the editor is using iframes with HTML (not XHTML) inside (at least for Mozilla at the moment). That's why I would like to see it using only divs for both IE and Mozilla (look at my posts above). That way the editor would simply inherit both the doctype and any css attached to the document on which the editor is used on.


(This post was edited by Jostein on May 26, 2003, 1:14 PM)


mimir
Novice

May 26, 2003, 6:14 PM

Post #12 of 72 (12882 views)
Shortcut
Re: [Jostein] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post


In Reply To
Because the editor is using iframes with HTML (not XHTML) inside (at least for Mozilla at the moment). That's why I would like to see it using only divs for both IE and Mozilla (look at my posts above). That way the editor would simply inherit both the doctype and any css attached to the document on which the editor is used on.


Tanks for your replay, but I did not understood how I can implement XHTML output.


joetheory
New User

Jun 6, 2003, 9:34 AM

Post #13 of 72 (12666 views)
Shortcut
Re: [mimir] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

i dont know what it is that im doing wrong....i dont think this could be any simpler but i cant seem to get any output. i have all the files included and then i just tried copying the shortest example block..... no output...any thoughts?




Code
     <?PHP 
$editor_name = "test_editor3";
$wysiwyg = new wysiwyg($editor_name);
$wysiwyg->set_body_type("div");
$wysiwyg->set_init_onload("no");
$wysiwyg->set_width("100%");
$wysiwyg->set_height("100%");
$wysiwyg->add_plugin("format_text");
$wysiwyg->add_plugin("general");
$wysiwyg->add_plugin("history");
$wysiwyg->add_plugin("select_color");
$wysiwyg->add_plugin("view_source");
?>



squiz
Novice

Jun 17, 2003, 1:01 AM

Post #14 of 72 (12522 views)
Shortcut
Re: [joetheory] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

Do you get any errors in your PHP error log or anything like that?


snowklein
New User

Jun 25, 2003, 5:33 AM

Post #15 of 72 (12434 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

what is the status of this mod? Has there been any further development?

I'd like to load the html area with dynamic content posted from a form. How do I use this class without the JS and DIV's. Basically, i wan't WYSIWYG mode all the time.

thanks,

dk


squiz
Novice

Jun 25, 2003, 5:32 PM

Post #16 of 72 (12418 views)
Shortcut
Re: [snowklein] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

I been doing some more work on it creating new plugins and fixing some small bugs I've found. Havn't done anything to do with using DIVs in Mozilla yet (really want to do that).

To use the class to put in post data, you can call the set_contents() function. Say your form var is called wysiwyg_content, you would create the wysiwyg object in PHP and then call $wysiwyg->set_contents($_POST['wysiwyg_content']); to init the editor with the html that was posted. Hope this is what your after. If not, I'll try and help you out a bit better if you can send me exactly what you want to do.

As for the JS and DIVs, I assume you mean the extra stuff I put in to hide/show the editor. If you dont want this, just leave it out. The code supplied in the editors on the test page will produce the editor and ensure it is always visible. The extra buttons I added are just for the CMS I'm building. They are not part of the source code of htmlArea in the zip file at all.

Greg


snowklein
New User

Jun 26, 2003, 7:52 AM

Post #17 of 72 (12402 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

OK, I think I need a div tag, but where?

This is the code, and I see nothing.

thanks in advance for the help.

<?php
error_reporting(E_ALL);
include_once('wysiwyg.inc');
?>

<html>
<head>
<title>Example of HTMLArea 3.0</title>
<link rel="stylesheet" type="text/css" href="core/htmlarea.css">
</head>
<body bgcolor="#FFFFFF">

<form action="" method="post">


<?php

$wysiwyg = new wysiwyg('test_editor1');
$wysiwyg->set_body_type('div');
$wysiwyg->set_init_onload('no');
$wysiwyg->set_contents('hello world');
$wysiwyg->set_stylesheet('core/htmlarea.css');
$wysiwyg->set_width('100%');
$wysiwyg->set_height('100%');
$wysiwyg->add_plugin('format_text');
$wysiwyg->add_plugin('format_font');
$wysiwyg->add_plugin('general');
$wysiwyg->add_plugin('s_script');
$wysiwyg->add_plugin('justify_text');
$wysiwyg->add_plugin('history');
$wysiwyg->add_plugin('insert_image');
$wysiwyg->add_plugin('table_editing');
$wysiwyg->add_plugin('insert_link');
$wysiwyg->add_plugin('select_color');
$wysiwyg->add_plugin('listing');
$wysiwyg->add_plugin('indenting');
$wysiwyg->add_plugin('text_indicator');
$wysiwyg->add_plugin('view_source');
$wysiwyg->add_plugin('popup_editor');
$wysiwyg->add_plugin('help');
$wysiwyg->add_plugin('about');
$wysiwyg->paint()
?>


</form>


</body>
</html>


squiz
Novice

Jul 7, 2003, 9:30 PM

Post #18 of 72 (12197 views)
Shortcut
Re: [snowklein] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

No div tag needed, just a little tweaking of the settings. For a normal editor on a page with no mode switching, do something like


Code
  $wysiwyg = new wysiwyg('test_editor1');  
$wysiwyg->set_body_type('div');
$wysiwyg->set_init_onload('yes');
$wysiwyg->set_contents('Your content goes here');
$wysiwyg->set_stylesheet('your stylesheet url here');
$wysiwyg->set_width('100%');
$wysiwyg->set_height('400');
$wysiwyg->add_plugin('format_text');
$wysiwyg->add_plugin('format_font');...



An example can be foudn at http://dev.squiz.net/~gsherwood/htmlarea/single_editor.php


(This post was edited by squiz on Jul 27, 2003, 5:25 PM)


ray1983
New User

Jul 9, 2003, 8:04 AM

Post #19 of 72 (12150 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

Great job dude,

it really works great except for the image part.

Are you planning to develop the image selecting part further,
or does anyone has got a better version so you can upload from your PC a picture and put it in the editor ?

Thanks in advance,

-Raymond


squiz
Novice

Jul 9, 2003, 4:32 PM

Post #20 of 72 (12138 views)
Shortcut
Re: [ray1983] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

I have developed other insert image and insert link plugins for the content management system I am developing. They work together with a flash site map to select files/images/pages etc using the flash interface. It is very customised for the system and could not be used anywhere else.

I dont have any plans as yet to develop another image plugin to allow users to upload images, but I'm sure it will happen in the future. The catch here though is that it will also be customised to work with the CMS.

Hopefully the PHP image browser mod going around might work for you. You would have to modify it to work as a plugin though but thats not too hard.

Greg


ray1983
New User

Jul 10, 2003, 2:53 AM

Post #21 of 72 (12128 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

Hi Squiz,

thank you for you reply.

I'll start working in the upload procedure today and when i'm finished i'll post it on this forum.

Kind regards,

-Raymond


snowklein
New User

Jul 28, 2003, 11:30 AM

Post #22 of 72 (11847 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post


Code
 740                 for (var i = 0; i < param["f_rows"]; ++i) { 
741 var tr = doc.createElement("tr");
742 tbody.appendChild(tr);
743 for (var j = 0; j < param["f_cols"]; ++j) {
744 var td = doc.createElement("td");
745 td.innerHTML = '&nbsp;';
746 tr.appendChild(td);
747 //if (HTMLArea.is_gecko) {
748 // Mozilla likes to see something
749 // inside the cell.
750 // td.appendChild(doc.createElement("br"));
751 //}
752 }
753 }

Here is the code I used in the htmlarea.js so that there are spaces filling each cell by default.

Do you now how to get <br/> instead of <br> when enter is pressed?


squiz
Novice

Jul 28, 2003, 5:31 PM

Post #23 of 72 (11828 views)
Shortcut
Re: [snowklein] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

One thing I will be doing for the editor is a plugin that will cleanup all the code when saving. IE does some wierd stuff and makes its own tags, but the HTML is not W3C compliant. This mod will eventually allow you to add plugins that are not buttons but modify the returned HTML on save.

I'm not sure of a better way to deal with the differences in the HTML produced by the two browsers. I think constant checking on key-press is over the top and will slow the editor to a crawl.

Greg


Wex
Novice

Aug 4, 2003, 2:36 PM

Post #24 of 72 (11641 views)
Shortcut
Re: [squiz] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

Can anyone help me to include the HtmlArea PHP with my dynamic PHP form? I think it's a little work for most of you. The problem at this moment is that the form and the WYSIWYG editor are two separate things. I want to include the editor in my dynamic labeled 'tekst' textarea of the form I use to update a weblog. I've included the document! Please...!!!

Wex.
Attachments: form.php (2.32 KB)


squiz
Novice

Aug 4, 2003, 5:30 PM

Post #25 of 72 (11632 views)
Shortcut
Re: [Wex] HtmlArea3 PHP Plugin Based Mod [In reply to] Can't Post

Not sure exactly what you are after looking at the attachment, but it basically goes like this:

You have a PHP file that prints your form already. You have a textbox in there somewhere that you want to now make a WYSIWYG editor. Instead of printing the textbox, you paste the PHP code to print out the editor.

Small example:


Code
 <form method="post"> 
<table>
<tr>
<td>Name:</td>

<td><input type="text"></td>
</tr>

<tr>
<td>Comment:</td>

<td><textarea></textarea></td>
</tr>
</table>
</form>



becomes:


Code
 <form method="post"> 
<table>
<tr>
<td>Name:</td>

<td><input type="text"></td>
</tr>

<tr>
<td>Comment:</td>

<td>
<?php
$wysiwyg = new wysiwyg('tekst');
$wysiwyg->set_body_type('div');
$wysiwyg->set_init_onload('yes');
$wysiwyg->set_contents('DEFAULT CONTENTS HERE');

$wysiwyg->set_width('100%');
$wysiwyg->set_height('400');
$wysiwyg->add_plugin('format_text');
// MORE PLUGINS HERE
$wysiwyg->paint();

?>
</td>
</tr>
</table>
</form>



You just sub the code in like that and then when the form is submitted (assuming submitted by post), the HTML contents will be available in the PHP var $_POST['tekst']

Hope this makes sense. If not, send your PHP file will the completed form without the editor and I'll put the code in for you.

Greg

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


Search for (options)