Skip to content

Instantly share code, notes, and snippets.

@bootleg224
bootleg224 / tinymce-cdn.html
Created August 15, 2018 17:52
TinyMCE with CDN HTML Example
<!DOCTYPE html>
<html>
<head>
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
<script>
tinymce.init({
selector: 'textarea',
external_plugins:
{
'saveToPdf': 'https://cdn.rawgit.com/Api2Pdf/api2pdf.tinymce/master/save-to-pdf/dist/save-to-pdf/plugin.js'
#HEADER#
columns = ["", ""]
rows = []
#END HEADER#
#BODY#
row = []
row.append()
row.append()
rows.append(row)
//Step 1: For Debugging you can add this code to the console
FrontendApiManager.onReady("evaluationForm", function (api) {
window.api = api;
});
//Step 2: Get Variables bound to javascript objects
var question1 = api.getQuestion("howWellDidThisApplicantPerform");
var question2 = api.getQuestion("comments");
//Step 1: Copy/Paste this into Console
FrontendApiManager.onReady("submissionForm", function (api) {
window.api = api;
});
//Step 2: Copy and Paste this Function and the handler
//Define Title Case Method
function titleCase(str) {
str = str.toLowerCase().split(' ');
//Step 1 Create a template to begin the handshake process "OpenWaterBegin"
$userIsLoggedIn = false; //set using buddy press
$_SESSION["_openwater_auth"] = $_GET["returnUrl"]; //get the return url from the query string and save it to the session
if($userIsLoggedIn) {
header("Location: /openwater/process"); //forward to process page
die();
} else {
for (var year = 2012; year <= EndingYear; year++)
{
for (var month = 1; month <= 12; month++)
{
if (year == EndingYear && month > EndingMonth)
{
continue;
}
<div id="intercom-widget"></div>
<script src="https://openwater-public.s3.amazonaws.com/sonar-uploads%2F4oB08ScXRgSrwOSYCgoZ_intercom-widget.bundle.js"></script>
<script>
window.onload = function () {
new IntercomWidget("https://openwater-support-stats.azurewebsites.net/api/GetRatingData");
};
</script>
Push Successful
{
"html": "<html>\n<head>\n\n <link rel=\"stylesheet\" href=\"https://unpkg.com/leaflet@1.3.4/dist/leaflet.css\" integrity=\"sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==\" crossorigin=\"\"/>\n <script src=\"https://unpkg.com/leaflet@1.3.4/dist/leaflet.js\" integrity=\"sha512-nMMmRyTVoLYqjP9hrbed9S+FzjZHW5gY1TWCHA5ckwXZBadntCNs8kEqAWdrb9O7rxbCaA4lKTIWjDXZxflOcA==\" crossorigin=\"\"></script>\n\n</head>\n\n<body>\n\n\n\n<div id=\"mapid\" style=\"width: 800px; height: 1000px;\"></div>\n<script>\n\n\tvar mymap = L.map('mapid').setView([51.505, -0.09], 13);\n\n\tL.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {\n\t\tmaxZoom: 18,\n\t\tattribution: 'Map data &copy; <a href=\"https://www.openstreetmap.org/\">OpenStreetMap</a> contributors, ' +\n\t\t\t'<a href=\"https://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>, ' +\n\t\t\t'Ima
{
"html": "<html>\n<head>\n\n <link rel=\"stylesheet\" href=\"https://unpkg.com/leaflet@1.3.4/dist/leaflet.css\" integrity=\"sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==\" crossorigin=\"\"/>\n <script src=\"https://unpkg.com/leaflet@1.3.4/dist/leaflet.js\" integrity=\"sha512-nMMmRyTVoLYqjP9hrbed9S+FzjZHW5gY1TWCHA5ckwXZBadntCNs8kEqAWdrb9O7rxbCaA4lKTIWjDXZxflOcA==\" crossorigin=\"\"></script>\n\n</head>\n\n<body>\n\n\n\n<div id=\"mapid\" style=\"width: 800px; height: 1000px;\"></div>\n<script>\n\n\tvar mymap = L.map('mapid').setView([51.505, -0.09], 13);\n\n\tL.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {\n\t\tmaxZoom: 18,\n\t\tattribution: 'Map data &copy; <a href=\"https://www.openstreetmap.org/\">OpenStreetMap</a> contributors, ' +\n\t\t\t'<a href=\"https://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>, ' +\n\t\t\t'Ima