Coder Social home page Coder Social logo

seaside-tinymce's Introduction

Seaside-TinyMCE

Seaside wrapper for Tiny MCE Editor

Project info

The "TinyMCE for Seaside" project provides the [TinyMCE][1] editor libraries for use in Seaside applications.

Project location

The project is located on GitHub at https://github.com/astares/Seaside-TinyMCE

License

The Smalltalk code is under MIT License. Note that TinyMCE has an LGPL license.

Installation

First install Seaside into your Pharo image:

Metacello new
  baseline:'Seaside3';
  repository: 'github://SeasideSt/Seaside:develop/repository';
  load.

Now you can install the packages necessary for TinyMCE by evaluating:

Metacello new
   baseline:'TinyMCE';
   repository: 'github://astares/Seaside-TinyMCE:master/src';
   load

Run locally

After starting the Seaside server you can check out the example at

http://localhost:8080/tinymce

alt text

How to use

Add the file library

As usual you should create a subclass of WAComponent for an own Seaside web application component. To use the library just register it with your Seaside application.

register
    |app|
    app := WAAdmin register: self asApplicationAt: 'tinymce'.
    app addLibrary: TMCEFileLibrary 

Render the editor component

To render the editor component you just need a textArea tag in your generated HTML code and modify it to be a TinyMCE Editor using a simple JavaScript. Here is an example Seaside rendering method:

renderContentOn: html

    html heading: 'TinyMCE Demo'.
    html form: [ 
        html textArea 
            callback: [ :value | text := value];
            with: text.
        html break.	
        html submitButton: 'Send to server and display' ].
        html break; horizontalRule.	
        html html: text.

        "Add the script to run TinyMCE"	
        html script: ' tinymce.init({selector:''textarea''});'

Check out the TinyMCE documentation for more.

seaside-tinymce's People

Contributors

astares avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.