Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 8th, 2005, 07:39 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default FCKEditor for CMS

Hi all,

I'm using FCKEditor for users' entering files' content. Problem is this WYSIWUG editor is currently working for only HTML content. Suppose I write

<?php
echo phpinfo();
?>


it displays

<!--p
echo phpinfo();
-->


I want it to help edit not only HTML but also PHP, CSS, JS file types.

Anyone of you've such experience, please reply. Thank you very much.

__________________
`~@#\^%&*/\.<.\/-|+|_!:;..=?>
PHP, SEO | anshul shrivastava | mediasworks.org | FB
 
Old June 8th, 2005, 09:40 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

If you want to be able to edit plain text files, I think you're better off outputting those to a plain textarea field. Web-based WYSIWYG tend to feature loads of auto-correcting and that sort of thing. They have those features to make them not only output in whichever markup standard the WYSIWYG supports (for instance, XHTML, as FCKEditor does), but also to get around some browser bugs. Explorer, for instance, takes all of the markup and forces it into uppercase HTML and removes all line breaks. This is a limitiation of Explorer, and a bug in the innerHTML property, some WYSIWYG's try to correct that. The WYSIWYG's also force quoting of attributes, and tend to rearrange those attributes, a feature that I find annoying, but if you have to use a WYSIWYG, you're pretty much stuck with those idiosyncrasies. So without building your own web-based IDE for plaintext languages, you're pretty much stuck with the auto-correction features of the WYSIWYG. Of course you can also dive into the bowels of the WYSIWYG and write something that forces it to ignore script, because I doubt the developers have much priority for those features, since the people using WYSIWYG tend to have little technical knowledge and no need for the ability to do that.

On the server-side you can also just detect the MIME type of the language you want to output and switch between a simple textarea and WYSIWYG accordingly.

My CMS features separate fields for JavaScript and CSS. I'm using HTMLArea, haven't tried to insert PHP yet, but I'll give it a go and let you know how it goes.

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
 
Old August 8th, 2006, 03:16 AM
Registered User
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm also facing the same problem in asp.

Does the FCKeditor supports asp pages(with asp coding) to edit?

Since it is commenting the ASP coding.

Suppose i write
<%

Response.write("Hello")

%>

it displays

<!--

Response.write("Hello")

-->


IF any one knows solution for this please reply.







Similar Threads
Thread Thread Starter Forum Replies Last Post
fckeditor bendjoe BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 September 15th, 2008 10:29 AM
FCKeditor not showing dofield BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 November 24th, 2007 05:20 AM
FCKeditor chraas BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 February 25th, 2007 12:30 PM
how to setup FCKEDITOR?? stzd8 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 December 12th, 2006 11:27 AM
FCKeditor in wrox blog nakori BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 June 11th, 2006 02:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.