Code Monkey home page Code Monkey logo

mathquillbasededitor's Introduction

Mathquill based WUSIWYG editor

MathQuill is an awesome formula editor. We have put some effort and made WUSIWUG editor on top of that.

What is this?

This is a javascript library that provides you a simple math editor that you can easily integrate to your webpage.

Dependencies

Getting Started

Download this package and extract files to your project lib folder.

Include required JS and CSS files to your webpage.

<html>
<head>
<link href="./path/to/mathquill.css" rel="stylesheet">
<link href="./path/to/matheditor.css" rel="stylesheet">

<script src="./path/to/jquery.js"></script>
<script src="./path/to/mathquill.min.js"></script>
<script src="./path/to/matheditor.js"></script>
</head>
<body>
.
.
.
.
</body>
</html>

Create MathEditor Instance and set all the options you required.

var mathEditor = new MathEditor('some_id');

mathEditor.addButtons(["fraction","square_root","cube_root","root",'superscript','subscript']);
// If you dont write this line editor will display default buttons. 

mathEditor.removeButtons(["fraction","square_root"])
// If you want to remove some buttons from default list.

mathEditor.styleMe({
    width: '500',
    height: '80'
});
// List of other options are mentioned bellow.

mathEditor.setTemplate('floating-toolbar');
// It will make button toolbar floating.

mathEditor.getLatex();
// It will return letex for input formula.

mathEditor.setLatex('\\frac{1}{2}');
// It will set letex in input area.
// It accepts any latex string.

Options

styleMe()

Attribute Type Default Description
width string 500 It will define minimum width for your editor
height string 40 It will define minimum height for your editor
textarea_background string #FFFFFF Background color for your editor textarea
eg. 'white', '#FFFFFF', 'rgba(255,255,255,0.5)'
textarea_foreground string #000000 Text color for your editor textarea
eg. 'white', '#FFFFFF', 'rgba(255,255,255,0.5)'
textarea_border string #000000 Border color for your editor textarea
eg. 'white', '#FFFFFF', 'rgba(255,255,255,0.5)'
toolbar_background string #FFFFFF Background color for your editor toolbar
eg. 'white', '#FFFFFF', 'rgba(255,255,255,0.5)'
toolbar_foreground string #000000 Text color for your editor toolbar
eg. 'white', '#FFFFFF', 'rgba(255,255,255,0.5)'
toolbar_border string #000000 Border color for your editor toolbar
eg. 'white', '#FFFFFF', 'rgba(255,255,255,0.5)'
button_background string #FFFFFF Background color for your editor toolbar button
eg. 'white', '#FFFFFF', 'rgba(255,255,255,0.5)'
button_border string #000000 Border color for your editor toolbar button
eg. 'white', '#FFFFFF', 'rgba(255,255,255,0.5)'

TinyMCE Support

  • You can integrate our MathEditor to tinyMCE with easy implementation.
  • Click here for documentation.

Help us Improve

mathquillbasededitor's People

Contributors

karan101292 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.