cancel
Showing results for 
Search instead for 
Did you mean: 

RichTextEditor Font Size

Former Member
0 Kudos

Hi,

I'm having problems with using the RichTextEditor. The initial font-size of the editor is very small. Is there any way to change it to a bigger default font size? I can't seem to figure out how to send information to the TinyMCE editor. The documentation seems to suggest using the onBeforeInit event, but it doesn't give any example on how to use it.

Regards

Albert Volschenk

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Just an update, I found this to be the answer.

Take note this is for TinyMCE4


attachBeforeEditorInit(function{oEvent){

var config = oEvent.getParameter("configuration");

config["setup] = function(ed){

{

ed.on('init', function(){

{

this.getBody().style.fontSize = '10pt'; //Set the font size here

}

}

});

Answers (1)

Answers (1)

BharathM
Participant
0 Kudos

Try this, this will work for default editor.

1) In view

xmlns: rte = "sap.ui.richtexteditor"

<rte:RichTextEditor editable="true" width="100%" showGroupLink="true" sanitizeValue="true" showGroupClipboard="false"  showGroupFontStyle = "true" showGroupStructure = "true" showGroupFont = "true" class="home-rte" showGroupUndo = "true" showGroupTextAlign = "true" editorType="TinyMCE" beforeEditorInit="beforeEditorInit"/>

1) In Controller

beforeEditorInit: function(oEvent) {
  oEvent.getParameter("configuration").content_css = "/css/Style.css";
}

3) In CSS

body,
td,
pre {
    color: #000;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: <SIZE>;
    margin: 8px;
}