zephyriot / zephyr-inf

0 stars 0 forks source link

code block formatting not working on blog posts #27

Closed nashif closed 7 years ago

nashif commented 7 years ago

Reported by David Kinder: We’ve had a regression in blog post formatting. If you look at https://www.zephyrproject.org/community/blog/introducing-javascript-runtime-zephyr-os, right under the sunglasses picture there’s supposed to be a code block starting:

var aio = require('aio'); 
var gpio = require('gpio'); 
var pins = require('arduino101_pins'); 
var sensitivityUp = 1500; 
var sensitivityDown = 1200; // hysteresis to avoid flicker
...

I tried editing the blog post to put a <pre> or <code> block in and if I use the HTML editor the tags are stripped, and there’s no option in the WYSIWYG editor for pre/code blocks either. This was fixed in the previous website but was probably broken when we switched to the new site.

(Imported from Jira INF-124)

nashif commented 7 years ago

by David Kinder:

From Brett Preston (LF)

They've added back in pre tags into the list of allowed elements for the wysiwyg text format. They've also gone ahead and fixed that blog post based off a past revision that did have the pre tags.

Blog editors can format as preformatted text by going to the wysiwyg editor when writing a blog, clicking the button on the far right (show/hide toolbars) to show additional toolbars if they aren't already, and using the 'format' dropdown to select preformatted.