This plugin using MathJax library for rendering math font.
This plugin compatible with TinyMce 4.
Is better to check this project before use: http://www.imathas.com/editordemo/demo.html.
npm install mathsymbols-tinymce-plugin --save
bower install mathsymbols-tinymce-plugin --save
Configure your TinyMce init settings by adding external_plugins
and usage of mathSymbols
:
tinymce.init({
selector: 'textarea',
external_plugins: {'mathSymbols': '/your-path-to-plugin/mathsymbols-tinymce-plugin/plugin.min.js'}, // Add plugin to Tinymce
toolbar: 'mathSymbols'
});
With this plugin you able to add Math Symbols into your content, but you also have to add MathJax to the website itself.
git clone https://github.com/Axel186/MathSymbols-TinyMCE-Plugin.git
cd MathSymbols-TinyMCE-Plugin
npm install
npm start
Now go to http://localhost:8080
.
npm run build
Now you have your own dist
folder - minimized version of plugin already there.
tinymce.init({
selector: 'textarea',
external_plugins: {'mathSymbols': 'http://your-website/.../mathsymbols-tinymce-plugin/plugin.js'}, // Add plugin to Tinymce
plugins: 'mathSymbols',
toolbar: 'mathSymbols',
});
By running the npm start
command you start the development server and open a browser window with an instance of TinyMCE with your plugin added to it. This window will reload automatically whenever a change is detected in the index.html
file in the static
folder or in one of the JavaScript files in the src
directory.
By running the npm run build
command Webpack will create a dist
directory with a child directory with the name of your plugin (mathsymbols-tinymce-plugin) is containing three files:
plugin.js
- the bundled pluginplugin.min.js
- the bundles, uglified and minified pluginLICENSE
- a file explaining the license of your plugin (copied over from src/LICENSE
)