CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Cute Editor for PHP

Print topic Send  topic

Author Message
pbrad

Posts: 58
Posted: 03/05/2011, 6:48 AM

Hi,
As I go kicking and screaming from tables to pure css I am interested in providing a more css friendly wysiwyg editor and Cute Editor for PHP seems to fit the bill.

I'm struggling to integrate it though and I was wondering if anyone had any tips on how to include it or any generic info on how to deploy a non-fckeditor wysiwyg editor.

Thanks,
Pete
_________________
Pete

CCS 4
MySQL
PHP
View profile  Send private message
Waspman

Posts: 948
Posted: 03/06/2011, 10:31 AM

Hi Pete,

I use NicEdit in my CMS

Although I don't let my users do anything more than add content
_________________
http://www.waspmedia.co.uk
View profile  Send private message
gerrit


Posts: 131
Posted: 03/06/2011, 11:19 AM

Pete,

I use wysiwygPro in my CMS System.
_________________
| http://www.vision.to |
View profile  Send private message
pbrad

Posts: 58
Posted: 03/06/2011, 11:49 AM

Thanks for the response guys but can you give me a heads up on how you implement either of those tools as the process is likely similar for the Cute editor.
thanks,
Pete
_________________
Pete

CCS 4
MySQL
PHP
View profile  Send private message
Waspman

Posts: 948
Posted: 03/07/2011, 10:44 AM

stick the code below anywhere on the page and all textareas will be wysiwyg

<script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
<script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>


you can put the js file local if you want.

If you have several textareas on a page but you just want one to be wysiwyg then you do this...


<script type="text/javascript" src="nicEdit.js"></script><script type="text/javascript">
//<![CDATA[
bkLib.onDomLoaded(function() {
new nicEditor({fullPanel : true}).panelInstance('textarea id');

});
//]]>
</script>

easy:)


I'll tell you what's also really cool, you can put it inline check it out...http://nicedit.com/



_________________
http://www.waspmedia.co.uk
View profile  Send private message
pbrad
Posted: 03/07/2011, 10:52 AM


_________________
Pete

CCS 4
MySQL
PHP
---------------------------------------
Sent from YesSoftware forum
http://forums.yessoftware.com/
pbrad

Posts: 58
Posted: 03/07/2011, 10:52 AM

Thanks Tony,
I took a look earlier today at nicedit earlier today and although it is too simplistic for what I am trying to provide, it is certainly easy to deploy.

I am still trying to figure out how to implement Cute Editor as it allows you to add css layers and even add styles on the fly. The only deployment instructions that they provide are:

<?php require_once "cuteeditor_files/include_CuteEditor.php" ?>
<html>
<body>
<form id="form1" method="POST">
<?php
//Step 2: Create Editor object.
$editor=new CuteEditor();
$editor->Text="Type here";
//Step 3: Set a unique ID to Editor
$editor->ID="Editor1";
//Step 4: Render Editor
$editor->Draw();
?>
</form>
</body>
</html>

Obviously, the "<?php require_once "cuteeditor_files/include_CuteEditor.php" ?> " is easy but what I am a little stumped on is how to connect the textarea on the page to the cute editor. Am I missing something really obvious here or do you have any ideas that I could try?
Thanks,
Pete
_________________
Pete

CCS 4
MySQL
PHP
View profile  Send private message
Waspman

Posts: 948
Posted: 03/07/2011, 11:10 AM

ID?
_________________
http://www.waspmedia.co.uk
View profile  Send private message
pbrad

Posts: 58
Posted: 03/07/2011, 11:14 AM

this is the html for the textarea on my codecharge page:

<textarea id="pages1page_content" rows="3" cols="50" name="{page_content_Name}">{page_content}</textarea>
_________________
Pete

CCS 4
MySQL
PHP
View profile  Send private message
Waspman

Posts: 948
Posted: 03/07/2011, 11:32 AM

Sorry Pete just had a go, 5 minutes they say...no chance haha.


_________________
http://www.waspmedia.co.uk
View profile  Send private message
pbrad

Posts: 58
Posted: 03/07/2011, 11:35 AM

Okay thanks Tony,
I will keep plugging away.
Cheers,
Pete
_________________
Pete

CCS 4
MySQL
PHP
View profile  Send private message
ckroon

Posts: 869
Posted: 03/21/2012, 9:15 AM

Wasp thanks for the link to nicedit.. I really like it.
Do you have a code sample of a customized toolbar?
I can't seem to get mine to work.
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
zhucehao

Posts: 7
Posted: 06/07/2012, 7:41 AM

Thanks for the response guys but can you give me a heads up on how you implement either of those tools as the process is likely similar for the Cute editor.
_________________






View profile  Send private message
pbrad

Posts: 58
Posted: 06/07/2012, 7:58 AM

Hi,
After a fair amount of research, I ended up using Tiny MCE which I believe is one of the better editors. It is also dead simple to implement. http://www.tinymce.com/

You just add the following code in the head of the page:

<script type="text/javascript" src="../tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
force_p_newlines : true,
theme : "advanced",
plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,imagemanager,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,filemanager",

// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,insertfile,insertimage,|,cleanup,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,

// Skin options
skin : "o2k7",
skin_variant : "silver",

// Example content CSS (should be your site CSS)
content_css : "../Styles/clixonweb_content_fonts.css",

// Drop lists for link/image/media/template dialogs
template_external_list_url : "../js/template_list.js",
external_link_list_url : "js/link_list.js",
external_image_list_url : "js/image_list.js",
media_external_list_url : "js/media_list.js",


});
</script>



You can select to edit all textareas on the page or selected ones.

Cheers,
Pete
_________________
Pete

CCS 4
MySQL
PHP
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.