Search code examples
phpjqueryhtmlcsscleditor

how to set cleditor font for <p> or any other tag?


I want to post a text from a textarea to another html page.

But when I paste the text in the textarea the font and size does not follow my styles! I've set the textarea and <p> font size and font-family but it did not help.

<textarea class="cleditor" id="textarea2"name="about" rows="3"></textarea>

    .cleditorMain {border:1px solid #ddd; padding:0 1px 1px; background-color:white}
    .cleditorMain iframe {border:none; margin:0; padding:0}
    .cleditorMain textarea {border:none; margin:0; padding:0; overflow-y:scroll; dir:rtl; font-family:Verdana,sans-serif;font-weight:normal;resize:none;outline:none /* webkit grip focus */}
    .cleditorToolbar {background: url('../img/toolbar.gif') repeat}
    .cleditorGroup {float:left; height:26px}
    .cleditorButton {float:left; width:24px; height:24px; margin:1px 0 1px 0;background: url('../img/buttons.gif')}
    .cleditorDisabled {opacity:0.3; filter:alpha(opacity=30)}
    .cleditorDivider {float:left; width:1px; height:23px; margin:1px 0 1px 0; background:#CCC}
    .cleditorPopup {border:solid 1px #999; background-color:white; position:absolute; font:10pt Arial,Verdana; cursor:default; z-index:10000}
    .cleditorList div {padding:2px 4px 2px 4px}
    .cleditorList p,
    .cleditorList h1,
    .cleditorList h2,
    .cleditorList h3,
    .cleditorList h4,
    .cleditorList h5,
    .cleditorList h6,
    .cleditorList font {padding:0; margin:0; background-color:Transparent}
    .cleditorColor {width:150px; padding:1px 0 0 1px}
    .cleditorColor div {float:left; width:14px; height:14px; margin:0 1px 1px 0}
    .cleditorPrompt {background-color:#F6F7F9; padding:4px; font-size:8.5pt}
    .cleditorPrompt input,
    .cleditorPrompt textarea {font:8.5pt Arial,Verdana;}
    .cleditorMsg {background-color:#FDFCEE; width:150px; padding:4px; font-size:8.5pt}

html code

    <p class="about-p">
         {!! $about['about'] !!}
    </p>

css

.about-p{
     font-family: Verdana,sans-serif;
     font-weight:normal;
     text-align:justify;
}

Solution

  • Solved!

        .cleditorList p{font-family:Verdana,sans-serif;!important; font-weight:normal;}
    

    styles should be added in this line.