Blog literacki, portal erotyczny - seks i humor nie z tej ziemi


ASP.NET











The Editize™ ASP.NET API Reference

This section of the manual documents in detail all the properties and methods
of the Editize API for ASP.NET.


To create an Editize field in a Web Form, first ensure that the
EditizeDotNet.dll has been placed in the bin folder in the root
of the current Web Application (note: Visual Studio .NET will do this for
you automatically). Then load the Editize Server Control:


<%@ Register TagPrefix="SitePoint"
Namespace="EditizeDotNet" Assembly="EditizeDotNet"
%>


You can then create an Editize field using the SitePoint:Editize
tag:


<SitePoint:Editize runat="server"
id="example"></SitePoint:Editize>


The following sections list the various attributes and event handlers that
you can assign to the SitePoint:Editize tag.


Basic Properties

ID
(Required) As shown above, the ID attribute
uniquely identifies the Editize field in your page, so that you
can access the content that users edit with it.



E.g.: As a tag attribute:



<SitePoint:Editize runat="server" id="MyEditize"
/>



E.g.: As an object property in C#:



MyEditize.ID
= "MyEditize";
Width
(Default: "600px") Specifies the width of the
Editize field. May be specified in pixels or as a percentage of
available width.
E.g.: As a tag attribute:



<SitePoint:Editize runat="server" id="MyEditize"
width="400px"
/>



E.g.: As an object property in VB.NET:



MyEditize.Width
= new Unit("600px")
Height
(Default: "600px") Same as Width,
but specifies the height of the Editize field.



E.g.: As a tag attribute:



<SitePoint:Editize runat="server" id="MyEditize"
height="400px"
/>



E.g.: As an object property in C#:



MyEditize.Height
= new Unit("600px");
Codebase
(Default: ".") A relative or absolute URL. Specifies
the directory where the Editize JAR files and license file(s) may
be found on your site. Editize may not work properly if its files
are stored in a password-protected directory of your Web server (the user
may be prompted, possibly repeatedly, for the username and password to access
the files). By placing them in an unprotected directory and then setting
this property to point to that directory, you can use Editize on
password-protected pages.
E.g.: As a tag attribute:



<SitePoint:Editize runat="server" id="MyEditize"
codebase="/editize/" />
Content
(Default: "") The HTML content in the control.
By setting this value, you can present the user with a document to edit.
By retrieving this value, you can obtain the document that the user created.
When this value has changed following a form submission, the control fires
a ContentChanged event (see
below).
E.g.: As a tag attribute:



<SitePoint:Editize runat="server" id="MyEditize"
content="&lt;p&gt;Document here&lt;/p&gt;"
/>



E.g.: As an object property in VB.NET:



MyEditize.Content = "<p>Document here</p>";

Feature Set Configuration Properties

The properties in this section are all of type bool, and may
all be set to either true or false to enable or
disable the feature in question.


E.g.: Disabling paragraph styles with a tag attribute:



<SitePoint:Editize runat="server" id="MyEditize"
paragraphstyles="false" />


E.g.: Disabling inline code by setting an object property in C#:



MyEditize.InlineCode
= false; // Disables inline code


At this time, all of these properties default to true.



 
EditButtons
If true, the user has access to the standard edit features
(cut, copy, paste, undo, redo) through buttons on the toolbar. If false,
the buttons do not appear, but the features remain available through the
pop-up menu and keyboard shortcuts.
ParagraphStyles
If true, the user can select paragraph styles from a drop-down
menu in the toolbar.
HeadingStyle
If true, the Heading style is available in the paragraph
style dropdown.
SubheadingStyle
If true, the Subheading style is available in the paragraph
style dropdown.
InsetStyle
If true, the Inset style is available in the paragraph style
dropdown.
MonospacedStyle
If true, the Monospaced style is available in the paragraph
style dropdown.
ParagraphAlignments
If true, the user can choose to make paragraphs (except for
Monospaced paragraphs) Left, Center, or Right aligned. If false,
all paragraphs are Left aligned.
BulletLists
If true, the user can create bullet lists with a button on
the toolbar.
NumberedLists
If true, the user can create numbered lists with a button
on the toolbar.
BoldText
If true, the user can create bold text with a button on the
toolbar, or with a keyboard shortcut (Ctrl-B).
ItalicText
If true, the user can create italic text with a button on
the toolbar.
UnderlineText
If true, the user can create underlined text with a button
on the toolbar, or with a keyboard shortcut (Ctrl-U).
HighlightText
If true, the user can create highlighted text (<span
class="highlighted">) with a button on the toolbar.
InlineCode
If true, the user can create inline code (<code>)
with a button on the toolbar, or with a keyboard shortcut (Alt-C).
Hyperlinks
If true, the user can create and remove hyperlinks with a
button on the toolbar. The user may choose whether a link loads in the default
window, or in a new window (<a href="..." target="_blank">).
Images
If true, the user can create and edit images with a button
on the toolbar. The user may provide an absolute or relative URL to the
image file to be inserted. Relative URLs are resolved based on the
property, described below.
Tables
If true, the user can create tables with a button on the
toolbar.

Display Properties

These properties let you configure Editize to display a document with
the same character styles that you use on your site. In this way, the WYSIWYG
editing interface presented by Editize can be made to exactly match
the look the content will have when displayed as part of your site.



BaseURL
(Default: none) Specifies the base URL for images and hyperlinks in the
document. Typically, you should set this to the same base URL that the finished
document will be displayed with on your Web site. For example, if the finished
document will be displayed by http://www.mysite.com/site/content.asp,
you should set the base URL to http://www.mysite.com/site/.
By so doing, you can tell Editize to insert an image with the URL graphics/mylogo.gif
and it will find the image file at http://www.mysite.com/site/graphics/mylogo.gif.
BaseFontFace
(Default: "Times New Roman") Specifies the font
face for Normal text in the Editize form field. All other character
and paragraph styles except Monospaced and Inline Code will inherit this
font face by default as well. You may specify a single font family (e.g.
"Verdana"), or one of the following logical font
names: "Dialog", "DialogInput",
"Monospaced", "Serif", "SansSerif",
or "Symbol".
BaseFontSize
(Default: 16) Specifies the font size for Normal text in
the Editize form field. All other character and paragraph styles
except Heading and Subheading will inherit this font size by default as
well. The value is specified as an integer (int) in pixels.
BaseFontColor
(Default: "#000000") Specifies the font color for
Normal text in the Editize form field. All other character and
paragraph styles except hyperlinks will inherit this font color by default
as well. The value is specified as an HTML color code string
("#RRGGBB"). HTML color names (e.g. "red")
are not supported at this time.
HeadFontFace
(Default: inherited) Specifies the font face for Heading style text in
the Editize form field. See
for details.
HeadFontSize
(Default: 32) Specifies the font size for Heading style text in the Editize
form field. See for
details.
HeadFontColor
(Default: inherited) Specifies the font color for Heading style text in
the Editize form field. See
for details.
SubheadFontFace
(Default: inherited) Specifies the font face for Subheading style text
in the Editize form field. See
for details.
SubheadFontSize
(Default: 24) Specifies the font size for Subheading style text in the
Editize form field. See
for details.
SubheadFontColor
(Default: inherited) Specifies the font color for Subheading style text
in the Editize form field. See
for details.
InsetFontFace
(Default: inherited) Specifies the font face for Inset style text in the
Editize form field. See
for details.
InsetFontSize
(Default: inherited) Specifies the font size for Inset style text in the
Editize form field. See
for details.
InsetFontColor
(Default: inherited) Specifies the font color for Inset style text in
the Editize form field. See
for details.
MonospacedBackgroundColor
(Default: none) Specifies the background color for Monospaced paragraphs.
Generally used to shade code blocks to set them apart from the rest of the
text. The value is specified as an HTML color code string ("#RRGGBB").
HTML color names (e.g. "red") are not supported at
this time.
HighlightColor
(Default: "#FF0000") For the highlighted text feature
to work, you must specify a font color for highlighted text with this property.
The value is specified as an HTML color code ("#RRGGBB").
HTML color names (e.g. "red") are not supported at
this time.
LinkColor
(Default: "#0000FF") Specifies the text color for
hyperlinked text in the Editize form field. The value is specified
as an HTML color code ("#RRGGBB"). HTML color names
(e.g. "red") are not supported at this time.
LinkUrls
(Default: "") Lets you provide a list of suggested link URLs,
which will appear in the hyperlink dialog box in a drop-down list. Users
can then select URLs from that list and then edit them if they wish, or
type their own URLs from scratch as well. This value should be specified
as string that contains a comma-separated list of URLs.



E.g. As a tag attribute:

<SitePoint:Editize runat="server" id="MyEditize"
linkurls="mailto:,http://www.sitepoint.com/article.php" />
E.g. As an object property in C#:



// Provide two suggested link URLs for users

MyEditize.LinkUrls="mailto:,http://www.sitepoint.com/article.php";

Special Purpose Properties

ImgListUrl



If this property is set to a URL, Editize will download a list
of images from this address and present it to the user in the Insert Image
dialog. The given URL may refer to a server-side script (e.g. to provide
an up-to-date list of images stored in a content management system), but
the output must be plain text of the following format:
url1 Description of the first image
url2 Description of the second image
url3 Description of the third image
...
Each line should contain a URL optionally followed by a description of the
image. The description (if specified) will both appear in the image list
and be used as the default value for the alt attribute if the
image is selected. If no description is provided, the URL of the image will
appear in the list instead.
ShowSubmitButton
(Default: false)



Setting this property true specifies that the Editize
field should display a Submit button at the bottom of the applet. Use of
this integrated submit button makes Editize compatible with Mac
OS 10.1 (OS X) (see Using an Integrated
Submit Button). When this mode is used, neither an <input type="submit"
/> tag nor the DisplaySubmit method should be placed
in the form.
SubmitButtonLabel
(Default: "Submit")



Allows you to specify the text label of the Submit button that Editize
will display at the bottom of the field if the ShowSubmitButton
property is set to true.

Control Events

The Editize ASP.NET Server Control supports a single event (of type
EventHandler), which is triggered each time the content in the
control has been changed following a form submission.



ContentChanged
Each time an ASP.NET page is submitted to the server, the Editize
Server Control checks if its contents have changed and updates its
Content property appropriately. Whenever this occurs, a ContentChanged
event is raised by the Control. You can set your own method to handle this
event to react to changes the user makes to the content. Detailed examples
of this are provided in the sample ASP.NET pages provided with this distribution
(in the /aspdotnet/samples directory).



Example: As a tag attribute:

<SitePoint:Editize runat="server" id="MyEditize"
onContentChanged="MyEditize_ContentChanged" />
<script language="C#" runat="server">
public void MyEditize_ContentChanged(object sender, EventArgs e)
{
// React to the event...
}
</script>
Example: As code in C#:

<script language="C#" runat="server">
private void Page_Load(object sender, EventArgs.e)
{
MyEditize.ContentChanged += new EventHandler(MyEditize_ContentChanged);
}

public void MyEditize_ContentChanged(object sender, EventArgs e)
{
// React to the event...
}
</script>


The EditizeSubmitButton Server
Control

To support browsers that don't support JavaScript-to-Java communication (Netscape
4.x, Opera, and Mac OS X browsers), you must replace the submit button in
your form with a Java applet. The EditizeSubmitButton Server
Control generates the code for this Java-based submit button.


The EditizeSubmitButton tag (also provided by the EditizeDotNet.dll
file) takes the following six attributes:



    lID: the standard identifier for the elementl
    lrunat: the standard runat attribute (i.e. runat="server")l
    lText: the text label to appear on the Submit button (default:
    "Submit")l

    lWidth: the width of the button (default: 100 pixels)l
    lHeight: the height of the button (default: 30 pixels)l
    lCodebase: the URL to indicate where editize.jar
    is located (see the attribute for the Editize
    tag above)l


E.g.:

<SitePoint:EditizeSubmitButton

ID="EditizeSubmitButton1" runat="server"

Text="Submit" Codebase="/editize/"
Width="100px" Height="30px"
/>




| Code
Generator |

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • qualintaka.pev.pl
  •