Jump to content
xisto Community
kudmus

Php Wysiwyg Is there anything like that?

Recommended Posts

I have noticed a problem with Dreamweaver CS3 when I try to edit a page with php content. I don't know if it's me or dreamweaver but it usual fails to work. For some time now I have I have been using text editors to edit every page that has some PHP and I'm not enjoying that. Is there a PHP editor that can edit a PHP page the way we edit HTMLs in dreamweaver. Imean edit something that u r actually looking at rendered the way it is going to look in a browser. I've Googled around but all I can get is discouragement. The guys here seem to think it's impossible. I found FCKeditor but I couldn't use it. It displays a blank page. I don't know if it's the activeX control or what.
Is everyone sure that this is impossible?

Share this post


Link to post
Share on other sites

It is indeed impossible. PHP is a back end, or "Server Side Script" which means the PHP code NEVER leaves the server. Everytime you view a php page eg the forum index: index.php the php code executes on the server then sends your browser some nice HTML to chew. The browser (and therefore the user) never sees any PHP code.

To run PHP code you need to install an apache server. And no WYSIWYG editor has this. Some can be use with one if you download the server and install it yourself. But even then all you see is some HTML. the PHP never leaves the server so the WYSIWYG editor only sees what PHP "writes". EG:

echo "Hello browser, how are you?";

all the browser ever gets sent is: Hello browser, how are you?

And so your WYSIWYG editor will only ever see that too. And because its not a HTML file you cant move the text around or anything.

So in short the only way to write PHP (real PHP) is to use a text or code editor. Either way you have to manually type the code. No shortcuts!

There never will be any WYSIWYG editor for PHP

Share this post


Link to post
Share on other sites

If a WYSIWYG editor were to edit nothing but print and echo statements in a PHP script, it would have to consider many things to work around to get the desired effect, like functions, statements, variables, etc, in and surrounding the print and echo statement. I would say it's an annoyance that's not worth the time and effort in getting to perfect.I've never used a WYSIWYG to construct a template. The most i've used a WYSIWYG for was for tables that had a lot of merged cells, and that was over 5 years ago, when i was still learning HTML. Haven't used a WYSIWYG since. I find it much more beneficial for the web developer to type things out by hand.

Share this post


Link to post
Share on other sites

There are HTML WYSIWYG editors that support the XAMPP server i think. But you still need to download the server and it will only show a preview of the site and you cant move things around. My code editor has a nice preview function that allows me to preview PHP, very handy!If you want a nice editor try "PHP Designer" Slightly misleading title as you cant design PHP.... But there you go. The personal edition is free and it has syntax highlighting, automatically adds closing brackets: ) ] } and adds the second double quote to form a pair. Which is handy!

Share this post


Link to post
Share on other sites

Hey guys. Thanks for all those replies. Maybe I'm not being clear. What I need is a WYSIWYG that has no problem with PHP code. I need something that can let my code alone and show all the other HTML parts perfectly as they are going to appear in the browser. Maybe on the code part it can just show an image to show that "There is an object here that I can't desplay".
I want all the the other page content in their correct positions. Even the div containing PHP code should be the right size. Tell me again there is nothing like that.

There are HTML WYSIWYG editors that support the XAMPP server i think.

FCKeditor does. I already have XAMPP installed and running perfectly on my rig.

Share this post


Link to post
Share on other sites

Only problem with what you are asking is: what about a CMS system which uses a "template" with php functions to produce the entire content of the site?
There would be no Navigation, no sidebars, no main content, no footer, etc... only blank-ness...
The place for a wysiwyg is to be able to drop-drag the elements of a page so that the design happens the way you want it. PHP will fill the content into those elements.

Here is a partial listing of a CMS Index page I use:

<div id="side" class="right">												<div class="single left">					<h3>Categories</h3>					<ul id="categorymenu">					<?php categories(); ?>					</ul>										<h3>RSS Feeds</h3>					<ul class="vertical">					<?php rss_links(); ?>					</ul>					<?php extra('extra'); ?>				</div>									<div class="single right">					<h3>New Posts</h3>					<ul class="vertical">					<?php menu_articles(0,10); ?>					</ul>											<h3>New Comments</h3>					<ul class="vertical">					<?php new_comments(5,30); ?>					</ul>				</div>								<div class="clearer"></div>			</div>
What would you expect to see in your WYSIWYG editor for that?

Share this post


Link to post
Share on other sites

Only problem with what you are asking is: what about a CMS system which uses a "template" with php functions to produce the entire content of the site?There would be no Navigation, no sidebars, no main content, no footer, etc... only blank-ness...
The place for a wysiwyg is to be able to drop-drag the elements of a page so that the design happens the way you want it. PHP will fill the content into those elements.

Here is a partial listing of a CMS Index page I use:

<div id="side" class="right">												<div class="single left">					<h3>Categories</h3>					<ul id="categorymenu">					<?php categories(); ?>					</ul>										<h3>RSS Feeds</h3>					<ul class="vertical">					<?php rss_links(); ?>					</ul>					<?php extra('extra'); ?>				</div>									<div class="single right">					<h3>New Posts</h3>					<ul class="vertical">					<?php menu_articles(0,10); ?>					</ul>											<h3>New Comments</h3>					<ul class="vertical">					<?php new_comments(5,30); ?>					</ul>				</div>								<div class="clearer"></div>			</div>
What would you expect to see in your WYSIWYG editor for that?

You just made very clear. thanks very much. I now know what to do and what to look for.
Thread closed

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.