Skip to content

Instantly share code, notes, and snippets.

View Req's full-sized avatar
🐱

Joel Peltonen Req

🐱
  • DCI Digital Career Institute gGmbH
  • Leipzig, Germany
View GitHub Profile
<#-- dump.ftl
--
-- Generates tree representations of data model items.
--
-- Usage:
-- <#import "dump.ftl" as dumper>
--
-- <#assign foo = something.in["your"].data[0].model />
--
-- <@dumper.dump foo />

TL;DR I'm a CKEditor core dev, I watched http://vimeo.com/76219173 in which CKEditor was mentioned, I'm sad now.

Disclaimer: I am a CKEditor core developer since January 2012, so I've been working nearly exclusively with contenteditable for almost two years. That made me an expert in some of fields that WYSIWYG editor deals with and gave me a decent knowledge about the rest. Although, my opinion may be biased.

I watched the video from "contenteditable: Roll for sanity" presentation by Garann Means with great interest. The contenteditable feature is a base for all WYSIWYG editors (except those with completely custom rendering system like Google Docs), but is not popular and most web developers have no idea about such thing (what on the other hand does not surprise me). What's more, those who stumble upon it quite often fall into the standard trap:

Hey, we just met and this is crazy, but we've got few hours so let's create a new WYSIWYG editor maybe!

This approach to web devel

@niflostancu
niflostancu / wkhtmltopdf.tablesplit.js
Last active February 1, 2024 17:28
WkHtmlToPdf Table Splitting Hack
/**
* WkHtmlToPdf table splitting hack.
*
* Script to automatically split multiple-pages-spanning HTML tables for PDF
* generation using webkit.
*
* To use, you must adjust pdfPage object's contents to reflect your PDF's
* page format.
* The tables you want to be automatically splitted when the page ends must
* have a class name of "splitForPrint" (can be changed).
@themattharris
themattharris / weekday_diff.php
Created August 12, 2011 21:20
weekday_diff - calculates the number of weekdays between two dates.
<?php
/**
* Calculated the number of weekdays (M-F) between two timestamps (inclusive).
*
* @param string $from the timestamp to start measuring from
* @param string $to the timestamp to stop measuring at
* @param string $normalise whether the time of day should be ignored (forces times to yyyy-mm-ddT00:00:00+00:00)
* @return int the number of weekdays between the two timestamps
* @author Matt Harris
*/