documentation icon indicating copy to clipboard operation
documentation copied to clipboard

plotly.js pseudo-html docs

Open alexcjohnson opened this issue 8 years ago • 2 comments

The html-like system we have for formatting text in plotly.js is getting more and more complicated, and is used in more and more places. see https://github.com/plotly/plotly.js/pull/1726 for the latest.

We should have a dedicated page to collect this, and somehow link it to the reference for each of the different attributes that can use it:

Our pseudo-html applies to really anywhere we display text: annotations, plot and axis titles, trace names. Also tick labels (categories, ticktext, tickprefix, ticksuffix...) and trace text and hovertext

cc @cldougl @etpinard

alexcjohnson avatar May 25 '17 17:05 alexcjohnson

good idea, we can have a text formatting page and link that on the general scatter text / hovertext / axes formatting pages as well.

cldougl avatar May 25 '17 18:05 cldougl

BTW looking at https://help.plot.ly/adding-HTML-and-links-to-charts/ - which seems to be the best reference we have ATM - it implies that you can use any HTML entity for this, but there are only a few you can actually use (mu, amp, lt, gt, nbsp, times, plusmn, deg). And in case the editor's text field includes its own entity converter we had better ensure lt and gt are left alone (see https://github.com/plotly/plotly.js/issues/2927). But note that https://github.com/plotly/plotly.js/pull/2932 includes built-in support for ALL numeric entities at least.

alexcjohnson avatar Aug 20 '18 23:08 alexcjohnson