Results 1 to 12 of 12
-
June 22nd, 2007, 02:05 AM #1
Thinking of making a Rich-Text Editor
... As the title states, I'm thinking of creating an open-source flash rich-text editor but I'm unsure as to whether or not it will be useful to anyone.
it will be able to send the complete HTML off to another page (which you will have to use your own code for, my example will just output the HTML)
Do you guys think I should go ahead with it, or not bother wasting my time.
Also if you have any ideas/features you want in it let me know, and I'll see what I can do, also I would like some more ideas for examples - regards, Nathan
-
June 22nd, 2007, 07:26 AM #229Registered User
postsThat would be pretty cool - useful to implement into forums like this and such. I'm just wondering how you're going to do the bold, underline, and italic buttons. I'm using the replaceSel() function, but it just replaces it, and theres no way to keep the text.
I also attempted using the TextSnapshot object, but I still couldn't get it to work.Last edited by [Ben]; June 22nd, 2007 at 07:29 AM.
-
June 22nd, 2007, 07:34 AM #3
I don't really see how that would be useful to anyone. Flash is quite limited concerning its HTML capabilities, so a rich text editor in Flash is bound to get outdone by the Javascript ones.
Wait, what?
-
June 22nd, 2007, 07:52 AM #4
just to see where your limits are
http://www.flashloaded.com/flashcomp...ashtexteditor/
they did ok job
-
June 22nd, 2007, 08:33 AM #51,168Registered User
posts
Already been done!
Andre de Groot has already made a really nice one. ---> Rich Text Editor - plus its FREE!
Quoted From Andre's Site:
It could possibly be a good start for someone wanting to build a Flash CMS? Hope that helps someone who comes across this thread, just wanted to shareI’ve created this textEditor some time ago for a reporter, to publis his articles directly to the database. Now I’ve cleaned it a bit up, so you can use this for your own projects.
Features:
Open / Save / Preview Articles
Bold / Italic / Underline text
Adding links
Adding and Uploading images
Undo / Redo
In the sample you can’t save images becouse of the server settings, if you setup this text editor for your own server that should work.
To let this text editor work, you have to change the scripts in the scripts folder to work on your database. You can also change the classes/fileManager.as class to change the paths to several scripts. In the toolbar class you can edit the toolbar, and hide some buttons.
-
June 22nd, 2007, 08:34 AM #682Registered User
postsI think it would be interesting... One could think of it as a part of a small flash CMS thingy. I absolutely would love it!
-
June 22nd, 2007, 08:41 AM #71,168Registered User
posts
-
June 22nd, 2007, 02:08 PM #88Registered User
postsHi all,
I'm currently working on an update of my textEditor, I just wanted to share that with you all, Currently working on dragging images from the imageBar (in the bottom of your screen), to the text, to place an image in the text.
There are still some problems left to solve, I will post it on my weblog when it is done.
I've also solved some bugs in the uploading part.
I've also planned to build a sort functionality in the imageBar.
It will be nice if you keep me informed about your progress, and feel free to use my code, and ask questions. I'll answer them if I have some time (whow, I love vacancies).
Andre de Groot
-
June 22nd, 2007, 05:41 PM #91,168Registered User
posts
-
June 29th, 2007, 11:40 AM #10477Regulated User
postsIf it doesn't need to be flash try tinymce.
link: http://tinymce.moxiecode.com/
heres a setup for simple formating and css styled text that flash 7 and 8 will handle
NB: please note that first you will have to follow all the instructions from tinymce
copy and paste below code into ----> tiny_mce/tiny_mce_setup.jsHTML Code:<head> <!-- tinyMCE --> // the tinymce setup file <script language="javascript" type="text/javascript" src="tiny_mce/tiny_mce.js"></script> // your setup file which enables features only avaliable to flash <script language="javascript" type="text/javascript" src="tiny_mce/tiny_mce_setup.js"></script> <!-- /tinyMCE --> </head>
last thing to do is create a css file that flash likes. view flash help for more detail about what flash likes.HTML Code:tinyMCE.init({ mode : "textareas", theme : "advanced", /* plugins : "devkit,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", */ plugins : "style,advlink,media,searchreplace,print,paste,directionality,fullscreen,visualchars,xhtmlxtras,template", // Delete all buttons //theme_advanced_disable: "separator, bold, italic, underline, strikethrough, justifyleft, justifycenter, justifyright, justifyfull, styleselect, formatselect, bullist, numlist, outdent, indent, undo, redo, link, unlink, anchor, image, cleanup, help, code, hr, removeformat, visualaid, sub, sup, charmap", // Delete all buttons theme_advanced_disable: "separator, bold, italic, underline, strikethrough, justifyleft, justifycenter, justifyright, justifyfull, formatselect, bullist, numlist, outdent, indent, undo, redo, link, unlink, anchor, cleanup, help, code, hr, removeformat, visualaid, sub, sup, charmap, image", theme_advanced_buttons1_add: "separator,bold, italic, underline,bullist,separator,pastetext,separator,removeformat,code,fullscreen,help", // theme_advanced_buttons3_add_before : "tablecontrols,separator", theme_advanced_buttons3_add : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_path_location : "bottom", content_css : "scripts/text_styles.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", external_link_list_url : "example_link_list.js", external_image_list_url : "tiny_mce/example_image_list.js", flash_external_list_url : "example_flash_list.js", media_external_list_url : "example_media_list.js", template_external_list_url : "example_template_list.js", file_browser_callback : "fileBrowserCallBack", theme_advanced_resize_horizontal : true, theme_advanced_resizing : true, nonbreaking_force_tab : true, apply_source_formatting : true, template_replace_values : { username : "Jack Black", staffid : "991234" } });
then save a css document into "scripts/text_styles.css", all of these styles should now be available via a drop down styles list.
if all goes well you should be able to save text to your database that is useable by flash and html.
-
June 29th, 2007, 12:16 PM #111,168Registered User
posts
-
June 30th, 2007, 02:23 AM #12477Regulated User
postsIn terms of results it works a treat!
My only gripe is tinymce loads a little slow.
i have just noticed that I omitted something very important.
in the php you need to add this code just before you save the output.
PHP Code:// convert flash unfriendly <strong> to <b>
$tags = array("<strong>", "<STRONG>");
$V = str_replace($tags, "<b>", $V);
$tags = array("</strong>", "</STRONG>");
$V = str_replace($tags, "</b>", $V);
// convert flash unfriendly <em> to <i>
$tags = array("<em>", "<EM>");
$V = str_replace($tags, "<i>", $V);
$tags = array("</em>", "</EM>");
$V = str_replace($tags, "</i>", $V);
Last edited by bootiteq; June 30th, 2007 at 02:34 AM.

Reply With Quote


Bookmarks