Nice looking editor for razorCMS in the future

Any off topic chat not related to anything, no spamming please.

Nice looking editor for razorCMS in the future

Postby Adminer » Wed Mar 07, 2012 5:42 pm

Hi!

I have founded and created a new editor bladepack to test in my dev lab in razorCMS (not to publish, because there is no security code - author warned about this in... china language - it's should be done before using editor on a real hosting).

The source code of this China editor is here: http://code.google.com/p/kindeditor/
It's working perfect as an editor in razorCMS, many features that you can not find in your ckEditor or TinyMCE ( like google maps in one click, nice looking emoticons, syntax highlighting php code/java/etc build in,... etc) ;-), and... they have their own filemanager build in - but... not correctly working for me in razorCMS (still in dev) - ;-) oh... it's a little fighting with relative and absolute paths there - theory is not working there :mrgreen: or localhost is not so good lab to test.

But... it's worth of observation in the future, because it's a very light and powerfull piece of code.
If you can run filemanager there - it's may be the best next editor for razorCMS, (of course if you can find in java, how to display images in relative paths in Razor content - not working for me if I have ./images path with one dot on my pages created before (many others tested editors are not working with relative ./path too, in razorCMS content, but if you create a content on localhost - it's to use).

If you have any opinion about this editor or working filemanager there, please write here freely...

Regards
Adminer
 
Posts: 578
Joined: Wed Apr 08, 2009 9:52 pm
Location: Poland

Re: Nice looking editor for razorCMS in the future

Postby smiffy6969 » Wed Mar 07, 2012 7:01 pm

Interesting, might have a play if i can find five minutes free.

smiffy
smiffy6969
 
Posts: 1866
Joined: Sat May 24, 2008 8:18 am
Location: Loughborough, UK

Re: Nice looking editor for razorCMS in the future

Postby Adminer » Thu Mar 08, 2012 9:22 pm

smiffy6969 wrote:Interesting, might have a play if i can find five minutes free.

smiffy


One minute more:

Code: Select all
<?php
///////////////////////
// Socket Allocation //
///////////////////////

// Add Blades to Sockets $bladeList['blade'] = 'socket'; //
$bladeList['adminHeadKindEditor'] = 'admin-xhtml-head';
$bladeList['KindEdit'] = 'editor';

///////////////////////
//      Blades       //
///////////////////////

// blade - add script link to admin xhtml head //
function adminHeadKindEditor() {
    if($_SESSION['adminLogIn']) {
        echo '<script src="../blade_packs/system_KindEdit/kindeditor.js" type="text/javascript"></script>';
      echo '<script src="../blade_packs/system_KindEdit/lang/en.js" type="text/javascript"></script>';
    }
}

// blade - start editor //
function KindEdit(&$te) {
    if($_SESSION['adminLogIn']) {
?>
<script type="text/javascript">     
KindEditor.ready(function(K) {
         var editor1 = K.create('#editbox', {
            langType : 'en',
            cssPath : '../blade_packs/system_KindEdit/plugins/code/prettify.css',
            uploadJson : '../blade_packs/system_KindEdit/jsp/upload_json.jsp',
            fileManagerJson : '../blade_packs/system_KindEdit/jsp/file_manager_json.jsp',
            allowFileManager : true            
         });
                     var uploadbutton = K.uploadbutton({
               button : K('#uploadButton')[0],
               fieldName : 'imgFile',
               url : '../blade_packs/system_KindEdit/php/upload_json.php?dir=file',
               afterUpload : function(data) {
                  if (data.error === 0) {
                     var url = K.formatUrl(data.url, 'upload');
                     K('#url').val(url);
                  } else {
                     alert(data.message);
                  }
               },
               afterError : function(str) {
                  alert('Error: ' + str);
               }
            });
            uploadbutton.fileBox.change(function(e) {
               uploadbutton.submit();
            });
         prettyPrint();
      });
</script>       
<?php
        $te[2] = '<textarea id="editbox" name="content">'.$te[4].'</textarea>';
    }
}
// end ///////////////////
?>
Adminer
 
Posts: 578
Joined: Wed Apr 08, 2009 9:52 pm
Location: Poland

Re: Nice looking editor for razorCMS in the future

Postby Adminer » Mon Jun 11, 2012 5:01 pm

Hi!
New kindeditor-4.1.1 version is here: http://code.google.com/p/kindeditor/
People can do another filemanager connector: http://www.kindsoft.net/view.php?bbsid= ... &pagenum=1
but still I have a problem to integrate filemanager into razorCMS ;-)

China CMS is working with it: http://210.36.16.166/upload/rar/2012/3/ ... 15_873.rar
or if you know chinaeese: http://210.36.16.166/topic.yws?forumId= ... 874&page=1

If someone wants to fight with it.... will be welcome :-) as an alternative for ckeditor.

Regards
Adminer
 
Posts: 578
Joined: Wed Apr 08, 2009 9:52 pm
Location: Poland


Return to Off-Topic Discussions



Who is online

Users browsing this forum: No registered users and 1 guest

cron