Day 24

Tips and Tricks: Invisibles plugin

As we have full control over how the code and plugins used will be displayed with Photon, let's create some interesting results!

Tips and Tricks: Invisibles plugin
Tips and Tricks: Invisibles plugin

Check the Invisibles plugin documentation here.

Symbols

The invisibles plugin has some selectors targeting the ::before pseudo-element. These selectors contain the content property with the value of the symbol to be displayed. By default for CHARACTER TABULATION, · for SPACE and for LINE FEED.

Example

CSS

.psh-invisibles-tab::before {
  content: '»';
}

.psh-invisibles-space::before {
  content: '.';
}

.psh-invisibles-lf::before {
  content: '';
}

Result

library(shiny)   

function(input, output) {     
  output$contents <- renderTable({
    inFile <- input$file1

    if (is.null(inFile))
    		return(NULL)

    read.csv(inFile$datapath, header=input$header, sep=input$sep, 
    		quote=input$quote)
  })
}

You can extend this tips and tricks section by sending us your contributions through Twitter, email or GitHub.

Share on

Facebook Twitter Google+ LinkedIn