The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 12 of 12

Thread: Thinking of making a Rich-Text Editor

  1. #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

  2. #2
    29
    posts
    Registered User
    That 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.

  3. #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?

  4. #4
    just to see where your limits are
    http://www.flashloaded.com/flashcomp...ashtexteditor/

    they did ok job

  5. #5
    1,177
    posts
    Registered User

    Fla Box Already been done!

    Andre de Groot has already made a really nice one. ---> Rich Text Editor - plus its FREE!

    Quoted From Andre's Site:
    Ií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.
    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 share

  6. #6
    I think it would be interesting... One could think of it as a part of a small flash CMS thingy. I absolutely would love it!

  7. #7
    1,177
    posts
    Registered User
    Quote Originally Posted by digitaldivide View Post
    I think it would be interesting... One could think of it as a part of a small flash CMS thingy. I absolutely would love it!
    I guess you missed my post above yours

  8. #8
    Hi 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

  9. #9
    1,177
    posts
    Registered User
    Quote Originally Posted by prg9 View Post
    Andre de Groot has already made a really nice one. ---> Rich Text Editor - plus its FREE!
    Quote Originally Posted by groot406 View Post
    Hi 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
    Hi Andre,

    Thanks for your great work and being so generous to let others use and expand upon your work. Thanks for the post here also. I hope you didnt mind me posting the link here

    Enjoy your vacation, you can never have to many of those.

  10. #10
    If 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

    HTML 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>
    copy and paste below code into ----> tiny_mce/tiny_mce_setup.js
    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"
            }
        });
    last thing to do is create a css file that flash likes. view flash help for more detail about what flash likes.
    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.

  11. #11
    1,177
    posts
    Registered User
    Quote Originally Posted by bootiteq View Post
    If it doesn't need to be flash try tinymce...... if all goes well you should be able to save text to your database that is useable by flash and html.
    Hi bootiteq, so I assume you have used this with Flash then? Was the success good ?

  12. #12
    Quote Originally Posted by prg9 View Post
    Was the success good ?
    In 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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012