Add stuff for applying style sheets.
git-svn-id: svn://10.0.0.236/trunk@37963 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2bd49a3742
commit
1faa402d05
@ -274,6 +274,18 @@
|
||||
<menuitem name="Definition term" onclick="EditorSetParagraphFormat('dt')"/>
|
||||
<menuitem name="Definition description" onclick="EditorSetParagraphFormat('dd')"/>
|
||||
</menu>
|
||||
<separator />
|
||||
<menu name="Apply Style Sheet">
|
||||
<menuitem name="Editor Styles 1" onclick="EditorApplyStyleSheet('chrome://editor/content/EditorStyles1.css')"/>
|
||||
<separator />
|
||||
<menuitem name="Oldstyle" onclick="EditorApplyStyleSheet('http://www.w3.org/StyleSheets/Core/Oldstyle')"/>
|
||||
<menuitem name="Modernist" onclick="EditorApplyStyleSheet('http://www.w3.org/StyleSheets/Core/Modernist')"/>
|
||||
<menuitem name="Midnight" onclick="EditorApplyStyleSheet('http://www.w3.org/StyleSheets/Core/Midnight')"/>
|
||||
<menuitem name="Ultramarine" onclick="EditorApplyStyleSheet('http://www.w3.org/StyleSheets/Core/Ultramarine')"/>
|
||||
<menuitem name="Chocolate" onclick="EditorApplyStyleSheet('http://www.w3.org/StyleSheets/Core/Chocolate')"/>
|
||||
<menuitem name="Steely" onclick="EditorApplyStyleSheet('http://www.w3.org/StyleSheets/Core/Steely')"/>
|
||||
</menu>
|
||||
|
||||
</menu>
|
||||
<menu name="Tools">
|
||||
<menuitem name="New Browser Window" onclick="EditorNewBrowser()"/>
|
||||
|
||||
@ -311,6 +311,12 @@ function EditorRemoveLinks()
|
||||
contentWindow.focus();
|
||||
}
|
||||
|
||||
function EditorApplyStyleSheet(styleSheetURL)
|
||||
{
|
||||
window.editorShell.ApplyStyleSheet(styleSheetURL);
|
||||
}
|
||||
|
||||
|
||||
// --------------------------- Output ---------------------------
|
||||
|
||||
function EditorGetText()
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<body>
|
||||
|
||||
<h2>Here's the deal...</h2>
|
||||
|
||||
@ -32,7 +32,25 @@ was written when I was eleven years old, but is remarkably similar to
|
||||
the writings of my later "hard-livin" years. It's titled "Reruns":
|
||||
</p>
|
||||
|
||||
<blockquote>
|
||||
<p class="note">
|
||||
"This paragraph has "class=note", so that we can play with styles."
|
||||
For example, we might insert generated content, like "Note: " before this
|
||||
paragraph.
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<p>
|
||||
This paragraph is inside a <div>. Here is some very run-o-the-mill text in
|
||||
a paragraph tag, for those
|
||||
of you who are into that kind of thing. I think at this point I shall
|
||||
regale you with some of my inestimable poetry, which will be presented
|
||||
in blockquote mode for your reading pleasure. This particular sample
|
||||
was written when I was eleven years old, but is remarkably similar to
|
||||
the writings of my later "hard-livin" years. It's titled "Reruns":
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<blockquote class="poem">
|
||||
<h4>Reruns</h4>
|
||||
Reruns are about as much fun,<br>
|
||||
as your dad taking all your mun,<br>
|
||||
@ -65,6 +83,30 @@ This text has two spaces between every word
|
||||
<li>list item 3</li>
|
||||
</ol>
|
||||
|
||||
<ol class="roman">
|
||||
<li>list item with child paragraphs
|
||||
<p>
|
||||
First child paragraph
|
||||
</p>
|
||||
<p>
|
||||
Second child paragraph
|
||||
</p>
|
||||
<p>
|
||||
Third child paragraph
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
Another list item
|
||||
</li>
|
||||
<li>
|
||||
Something else.
|
||||
</li>
|
||||
<li>
|
||||
Another thing.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
|
||||
<table BORDER>
|
||||
<tr><td>cell 1 </td><td>cell 2 </td><td>cell 3 </td></tr>
|
||||
<tr><td>cell 4 </td><td>cell 5 </td><td>cell 6 </td></tr>
|
||||
@ -72,7 +114,7 @@ This text has two spaces between every word
|
||||
</table>
|
||||
|
||||
|
||||
<table BORDER>
|
||||
<table BORDER id="bigtable">
|
||||
<tr><td>big cell 1 </td>
|
||||
<td>
|
||||
<table BORDER>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<body>
|
||||
|
||||
<h2>Here's the deal...</h2>
|
||||
|
||||
@ -32,7 +32,25 @@ was written when I was eleven years old, but is remarkably similar to
|
||||
the writings of my later "hard-livin" years. It's titled "Reruns":
|
||||
</p>
|
||||
|
||||
<blockquote>
|
||||
<p class="note">
|
||||
"This paragraph has "class=note", so that we can play with styles."
|
||||
For example, we might insert generated content, like "Note: " before this
|
||||
paragraph.
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<p>
|
||||
This paragraph is inside a <div>. Here is some very run-o-the-mill text in
|
||||
a paragraph tag, for those
|
||||
of you who are into that kind of thing. I think at this point I shall
|
||||
regale you with some of my inestimable poetry, which will be presented
|
||||
in blockquote mode for your reading pleasure. This particular sample
|
||||
was written when I was eleven years old, but is remarkably similar to
|
||||
the writings of my later "hard-livin" years. It's titled "Reruns":
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<blockquote class="poem">
|
||||
<h4>Reruns</h4>
|
||||
Reruns are about as much fun,<br>
|
||||
as your dad taking all your mun,<br>
|
||||
@ -65,6 +83,30 @@ This text has two spaces between every word
|
||||
<li>list item 3</li>
|
||||
</ol>
|
||||
|
||||
<ol class="roman">
|
||||
<li>list item with child paragraphs
|
||||
<p>
|
||||
First child paragraph
|
||||
</p>
|
||||
<p>
|
||||
Second child paragraph
|
||||
</p>
|
||||
<p>
|
||||
Third child paragraph
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
Another list item
|
||||
</li>
|
||||
<li>
|
||||
Something else.
|
||||
</li>
|
||||
<li>
|
||||
Another thing.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
|
||||
<table BORDER>
|
||||
<tr><td>cell 1 </td><td>cell 2 </td><td>cell 3 </td></tr>
|
||||
<tr><td>cell 4 </td><td>cell 5 </td><td>cell 6 </td></tr>
|
||||
@ -72,7 +114,7 @@ This text has two spaces between every word
|
||||
</table>
|
||||
|
||||
|
||||
<table BORDER>
|
||||
<table BORDER id="bigtable">
|
||||
<tr><td>big cell 1 </td>
|
||||
<td>
|
||||
<table BORDER>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user