Forum closed. New forum available at http://community.wymeditor.org/

New to WYMeditor

Support forum for WYMeditor.

New to WYMeditor

Postby Alexqw on Mon Jul 09, 2007 5:49 pm

I am currently working on a project to migrate all existing webpages in our organization (100,000+ pages) into a CMS (OpenCMS). Accessible and valid code is very important to us, but everyone in our organization has to be allowed to update the individual pages, thus enters the need for a WYSIWYG/M editor. FCKeditor is trash and TinyMCE is most of what we want, but not 100%. The code that WYMeditor generates is beautiful, I just have a few questions.
1) We have our own custom CSS templates already written, is there any way that we can load them into the editor window so that the user can see our custom formatting while editing content?
2) Is there any way to integrate a file browser into the image and link dialog boxes? Since we are using a CMS it is important that our users can browse to another page in the CMS to link to. OpenCMS has a file browser built into it, so one would only have to call that and send communicate the necessary information instead of reinventing the wheel.

Thank you for your help. I look forward to seeing if we can incorporate WYMeditor into our project.

---Alex
Alexqw
 
Posts: 1
Joined: Mon Jul 09, 2007 5:37 pm

Postby jfh on Wed Jul 18, 2007 7:18 am

1) Yes, please see http://trac.wymeditor.org/trac/wiki/0.4 ... stylesheet

2) Dialogs are customizable, see e.g. trunk/src/test/advanced.html in the repository (these examples will be included in the next release).
Example code, to add in WYMeditor's options:
Code: Select all
postInitDialog: function(wym,wdw) {

        var body = wdw.document.body;
       
        //add a select box populated with predefined values to the dialog
       
        var sSelectLink = "<div class='row row-indent'>"
        + "<select class='wym_select_link'>"
        + "<option selected value='WYMeditor http://www.wymeditor.org/'>"
        + "WYMeditor<\/option>"
        + "<option value='SourceForge http://www.sourceforge.net/'>"
        + "SourceForge<\/option>"
        + "<option value='GNU http://www.gnu.org/'>"
        + "GNU<\/option>"
        + "<\/select>"
        + "<input class='wym_choose' type='button'"
        + " value='{Choose}' />"
        + "<\/div>";
       
        $j(body)
          .filter('.wym_dialog_link').find('fieldset').eq(0)
          .prepend(wym.replaceStrings(sSelectLink));
         
        $j(body)
          .find('.wym_choose')
          .click(function() {

            var sVal = $j(body).find('.wym_select_link').val();
           
            $j(body)
              .find('.wym_href')
              .val(sVal.substring(sVal.lastIndexOf(' ') + 1));
            $j(body)
              .find('.wym_title')
              .val(sVal.substr(0, sVal.lastIndexOf(' ')));
          });
      }


FYI, we plan to implement a 'Media API', see http://trac.wymeditor.org/trac/wiki/Dev ... 2007-06-29

HTH.
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium


Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests

cron