Jump to content

Rich Text Editor Styling


Shadow82x

Recommended Posts

In the next version of IPB, it would be quite beneficial if we could style the Rich Text Editor with the theme's stylesheets. Currently the rich text editor style is hardcoded in ../public/js/ips.editor.js

        var ips_frame_html = "";

        ips_frame_html += "<html id=\""+this.id+"_html\">\n";

        ips_frame_html += "<head>\n";

        ips_frame_html += "<meta http-equiv=\"content-type\" content=\"text/html; charset=" + this.options.char_set + "\" />";

        ips_frame_html += "<style type='text/css' media='all'>\n";

        ips_frame_html += "body {\n";

        ips_frame_html += "    background:#FFFFFF;\n";

        ips_frame_html += "    margin: 0px;\n";

        ips_frame_html += "    padding: 4px;\n";

        ips_frame_html += "    font-family: arial, verdana, tahoma, sans-serif;\n";

        ips_frame_html += "    font-size: 9pt;\n";

        ips_frame_html += "}\n";

        ips_frame_html += "font[size=\"1\"] {\n";

        ips_frame_html += "    font-size: 9px;\n";

        ips_frame_html += "}\n";

        ips_frame_html += "font[size=\"2\"] {\n";

        ips_frame_html += "    font-size: 13px;\n";

        ips_frame_html += "}\n";

        ips_frame_html += "font[size=\"3\"] {\n";

        ips_frame_html += "    font-size: 15px;\n";

        ips_frame_html += "}\n";

        ips_frame_html += "font[size=\"4\"] {\n";

        ips_frame_html += "    font-size: 17px;\n";

        ips_frame_html += "}\n";

        ips_frame_html += "font[size=\"5\"] {\n";

        ips_frame_html += "    font-size: 21px;\n";

        ips_frame_html += "}\n";

        ips_frame_html += "font[size=\"6\"] {\n";

        ips_frame_html += "    font-size: 26px;\n";

        ips_frame_html += "}\n";

        ips_frame_html += "font[size=\"7\"] {\n";

        ips_frame_html += "    font-size: 36px;\n";

        ips_frame_html += "}\n";

        ips_frame_html += "</style>\n";


So if you have something like a dark theme, this causes some complications if you want to change that white editor background to something darker. Not to mention it would affect all the themes -- dark and light to use that background color as well.

Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...