What do we think about MicroTiny in CMSMS 2?

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: What do we think about MicroTiny in CMSMS 2?

Post by calguy1000 »

I thinking about optie 4, learning to create my own module and maybe I manage to add the editor I want to CMSMS (if thats allowed by CMSMS otherwise let me know please).
You can do whatever you want. CMSMS does not restrict you.
If however you want to share it.... then you need to be aware of licensing.

The license of your editor must be compatible with the GPL, and your license must be GPL (because CMSMS is GPL).
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: What do we think about MicroTiny in CMSMS 2?

Post by calguy1000 »

Just for giggles (cuz I did one for Syntax Hilighters in 2.0 yesterday).
I created a trivial example of how to create a WYWISYG module for CMSMS.

This example uses a cdn for tinymce. and enables no plugins, sets no options, has no admin panel of it's own, has no file browser, no cmsms linker, etc. but it works.

Adding all of those plugins and options is of course very time consuming.

Anyways... here's the code.

Code: Select all

<?php

class TinyTest extends CMSModule
{
    public function GetName() { return basename(__CLASS__); }
    public function GetVersion() { return 0.1; }

    public function HasCapability($capability, $params = array())
    {
        if( $capability == CmsCoreCapabilities::WYSIWYG_MODULE ) return TRUE;
        return FALSE;
    }

    public function WYSIWYGGenerateHeader($selector = null,$cssname = null)
    {
        if( !$selector ) $selector = 'textarea.TinyTest';
        $out = '<__script__ src="//cdn.tinymce.com/4/tinymce.min.js"></__script>';
        $out .= "<__script__>tinymce.init({ selector:'{$selector}' });</__script>";
        return $out;
    }
}
This code of course has to be in a file named: <site root>/modules/TinyTest/TinyTest.module.php
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
musicscore
Power Poster
Power Poster
Posts: 496
Joined: Wed Jan 25, 2006 11:53 am

Re: What do we think about MicroTiny in CMSMS 2?

Post by musicscore »

Thank you very much Calguy1000. It's my first start and I'm thankfull for your help/tip.
Locked

Return to “The Lounge”