Search code examples
ckeditorlatexmathjaxtex

How to expand math field in CKEditor


Math formula field is small.

This is default behavior of the Latex plugin. Can the field can be expanded? If yes, then how can I do that?

I have browse to fix this solution but none of them match with what I want. Anyone know how to expand it?

This is the screen shot:

enter image description here

UPDATED

return{title:b.title,minWidth:1000,minHeight:650,contents:[{id:"info",elements:[{id:"equation",type:"textarea",rows:10,label:b.dialogInput, ..

enter image description here

Note: I can expand the dialog display but I cannot expand the textfield formula form. It seem like the variable rows not functioning.

Should I declare the variable rows in other file?


Solution

  • You can edit the code that displays this dialog.

    In your ckeditor folder, under the /plugins/mathjax/dialogs/ folder, open the mathjax.js file.

    To make the dialog wider change the minWidth attributes. For example, to set the width to 750 pixels:

    return {
        title: lang.title,
        minWidth: 750,
        minHeight: 100,
        contents: [
    

    To add more lines to the formula textbox, add the rows attribute with the number of lines you want (the rows attribute is not there by default so add it). For example, to make the textbox 10 lines long:

    elements: [
        {
            id: 'equation',
            type: 'textarea',
            rows: 10,
            label: lang.dialogInput,
    

    Here's a screenshot with the above changes:

    Example

    Save the file and clear your cache before testing.