Menu

Installation

Anonymous Kempelen

Style Library installation - ASP.NET version

Currently only an ASP.NET version is available. This documentation assumes that you already have an ASP.NET Web Site Project that contains TinyMCE.

This will not work with original TinyMCE release. We are working on sorting out our patches and providing a way to get this plugin work with less modified TimyMCE. This page was created only to give a brief introduction of how it could be installed.

  1. Check out the source code from this SVN.

Compile library projects

  1. Compile Libs/CssDom
  2. Compile Libs/StyleLibrary (because this depends on CssDom library)
  3. Copy WPS.Libraries.CssDom.dll and WPS.Modules.StyleLibrary.dll to your bin folder.

Install the plugin

  1. Copy the stylelibrary plugin to tiny_mce/plugins folder
  2. Add stylelibrary to plugins and buttons in your TinyMCE's configuration
    plugins: ...,stylelibrary,...
    theme_advanced_buttons1: ...,stylelibrary,...
    

Configuration settings

This full example shows defaults. See below for documentation.

stylelibrary_fontsizelist: "80%,90%,100%,110%,120%,135%,150%,175%,200%,250%,300%"
stylelibrary_lineheightlist: "normal,80%,90%,100%,110%,120%,140%,160%,200%"
stylelibrary_indentlist: "0,0.5em,1em,1.5em,2em,3em"
stylelibrary_marginlist: "0,1px,2px,5px,10px,15px,20px,30px,0.5em,1em,2em",
stylelibrary_fontfamilylist: 
    "Andale Mono=Andale Mono, monospace;" +
    "Arial=Arial, Helvetica, sans-serif;" +
    "Arial Black=Arial Black, Avant garde, sans-serif;" +
    "Arial Narrow=Arial Narrow, sans-serif;" +
    "Book Antiqua=Book Antiqua, Palatino, serif;" +
    "Brush Script MT=Brush Script MT, cursive;" +
    "Comic Sans MS=Comic Sans MS, cursive;" +
    "Courier=Courier, monospace;" +
    "Courier New=Courier New, monospace;" +
    "Helvetica=Helvetica, sans-serif;" +
    "Garamond=Garamond, serif;" +
    "Georgia=Georgia, Palatino, serif;" +
    "Impact=Impact, Chicago, sans-serif;" +
    "Lucida=Lucida, sans-serif;" +
    "Lucida Sans=Lucida Sans, sans-serif;" +
    "Lucida Console=Lucida Console, monospace;" +
    "Palatino=Palatino, serif;" +
    "Palatino Linotype=Palatino Linotype, serif;" +
    "Tahoma=Tahoma, sans-serif;" +
    "Times=Times, serif;" +
    "Times New Roman=Times New Roman, Times, serif;" +
    "Trebuchet MS=Trebuchet MS, Geneva, sans-serif;" +
    "Verdana=Verdana, Geneva, sans-serif;"
stylelibrary_previewstyles: 
user_css:
stylelibrary_headhtml:

user_css

The most important setting

Content CSS file that name defines all IMG, TABLE, DIV, FONT and HEADING styles (and only that), in a kind of strict format. We usually call this "wysiwyg.css".

stylelibrary_fontsizelist

List of values for the font size dropdowns. Use values that are valid for CSS font-size value.

stylelibrary_lineheightlist

List of values for the line height dropdowns. Use values that are valid for CSS line-height value.

stylelibrary_indentlist

List of values for the text indent dropdowns. Use values that are valid for CSS text-indent value.

stylelibrary_marginlist

List of values for the margin width dropdowns. Use values that are valid for CSS margin value.

stylelibrary_fontfamilylist

List of values for the font dropdowns. Use values that are valid for CSS font-family value. Please use usual CSS notation with fallbacks and a generic name as last.

stylelibrary_previewstyles

CSS files that should be loaded into the preview IFRAME. Normally same as "content_css" setting!

stylelibrary_headhtml

Any extra code to send to HTML HEAD tag of preview IFRAMEs and the main overview page. Can be used to load external fonts for example.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.