Home Page

Sample code in Raw HTML objects using "PrismJS" add-in resources.


HTML:

<div class="RichTextElement">
    <div class="figure-content">
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum bibendum, ligula ut feugiat rutrum, mauris libero ultricies nulla, at hendrerit lectus dui bibendum metus.</p>
    </div>
</div>


CSS:

#title {
    background: url(top.png) no-repeat;
    /*Here we expand the title so we can
    have the nice rounded top with drop shadow,
    then use padding to move the content back */
    margin: 0px -17px;
    padding: 14px 22px 14px 22px;
    height:140px;
    overflow:hidden;
}

h1 {
    font-size: 2.9em;
    text-align: center;
    margin: 10px;
    margin-top: 22px;
    margin-bottom: 15px;
    display: block;
    font-weight:normal;
}


Javascript (jQuery):

<script type="text/javascript">
	var item = $("blockquote")[1];
	$(".RichTextElement").find(item).wrapInner( "<code class='language-javascript'></code>" );
</script>




© SCD 2016