npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dgf-tinymce-plugin

v0.9.82

Published

Diagram Factory TinyMCE Plugin

Downloads

1

Readme

dgf-tinymce-plugin

Diagram Factory TinyMCE Plugin.

Product Homepage

On the product homepage you will find a gallery with sample applications and tutorials. And you can work with a live installation of the Diagram Factory TinyMCE Plugin.

Installing

If you use npm, npm install dgf-tinymce-plugin. Otherwise, Download the latest release. You can load directly from dgfjs.org. For example:

<script src="https://dgfjs.org/dgf-tinymce-plugin.js"></script>

Or for the minified version:

<script src="https://dgfjs.org/dgf-tinymce-plugin.min.js"></script>

Setup TinyMCE with the Diagram Factory Plugin:

<html>
<head>
	<title>DGF with TinyMCE</title>
	
	<!-- Add D3, TinyMCE and DGF -->		
	<script src="https://d3js.org/d3.v4.min.js" charset="utf-8"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.4/tinymce.min.js"></script>
	<script src="https://dgfjs.org/dgf.min.js"></script>
	
	<!-- Initialize DGF and add the DGF Plugin to TinyMCE -->
	<script>
	dgf.init({
		setups: [
			dgf.setupD3,
			dgf.setupDGF,
			dgf.setupBasic,
			dgf.setupD3ScaleChromatic,
			dgf.setupHierarchic,
			dgf.setupMultiSeries,
			dgf.setupTime,
			dgf.setupGallery
		]
	});
	
	tinymce.init({
		selector:"textarea",
		external_plugins: {
			"dgf": "https://dgfjs.org/dgf-tinymce-plugin.min.js"
		},
		toolbar: "undo redo | alignleft aligncenter alignright alignjustify | dgf",
		height: 600,
		content_css : "https://dgfjs.org/dgf.css"
	});
	</script>
	
	<link rel="stylesheet" type="text/css" href="https://dgfjs.org/dgf.css">
</head>
<body>
	<h2>DGF with TinyMCE</h2>

	<textarea>
		<figure id="dgf_001" class="dgf mceNonEditable" contenteditable="false" data-dgf='{
			"reader":{
				"data":"x,y\nA,1\nB,4\nC,9,\nD,16\nE,25"
			},
			"extend":"dgf.setupBarDiagram"
		}'>
		<figcaption class="mceEditable" contenteditable="true">New Diagram</figcaption>
		</figure> 
	</textarea>
</body>
</html>

When you display the above page in a web browser a bar diagram will be displayed inside the tinymce editor and the toolbar shows the diagram factory's button: Diagram Factory inside TinyMCE

When you double click the diagram a window opens. Here you can change the data and modify the diagram's attributes: Diagram Factory Reader Tab

To insert a new diagram press the dgf button and choose a diagram type: Diagram Factory New Diagram