java.lang.Object | |
↳ | chan.content.ChanMarkup |
Provides HTML posts handling and post editing.
If your chan supports posting, you must implement obtainCommentEditor(String)
.
You can configure post markup handling using these methods:
addTag(String, int)
addTag(String, String, int)
addTag(String, String, String, int)
addBlock(String, boolean, boolean)
addBlock(String, String, boolean, boolean)
addBlock(String, String, String, boolean, boolean)
addPreformatted(String, boolean)
addPreformatted(String, String, boolean)
addPreformatted(String, String, String, boolean)
addColorable(String)
addColorable(String, String)
addColorable(String, String, String)
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TAG_ASCII_ART | Ascii art tag constant value. | ||||||||||
TAG_BOLD | Bold tag constant value. | ||||||||||
TAG_CODE | Code tag constant value. | ||||||||||
TAG_HEADING | Code tag constant value. | ||||||||||
TAG_ITALIC | Italic tag constant value. | ||||||||||
TAG_OVERLINE | Overline tag constant value. | ||||||||||
TAG_QUOTE | Quote tag constant value. | ||||||||||
TAG_SPOILER | Spoiler tag constant value. | ||||||||||
TAG_STRIKE | Strikethrough tag constant value. | ||||||||||
TAG_SUBSCRIPT | Subscript tag constant value. | ||||||||||
TAG_SUPERSCRIPT | Superscript tag constant value. | ||||||||||
TAG_UNDERLINE | Underline tag constant value. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Marks given | |||||||||||
Marks given | |||||||||||
Marks given | |||||||||||
Marks given | |||||||||||
Marks given | |||||||||||
Marks given | |||||||||||
Marks given | |||||||||||
Marks given | |||||||||||
Marks given | |||||||||||
Add tag to handle. | |||||||||||
Add tag to handle. | |||||||||||
Add tag to handle. | |||||||||||
Return linked | |||||||||||
Calls when client want to determine tag's supportability. | |||||||||||
Calls when client want to show posting activity. | |||||||||||
This method calls every time HTML parser reaches links to other posts like |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Ascii art tag constant value.
Bold tag constant value.
Code tag constant value.
Code tag constant value.
Italic tag constant value.
Overline tag constant value.
Quote tag constant value.
Spoiler tag constant value.
Strikethrough tag constant value.
Subscript tag constant value.
Superscript tag constant value.
Underline tag constant value.
Marks given tagName
as block tag if tag contains cssClass
in class attribute.
For spaced
blocks parser will add empty lines around.
Parameters | |
---|---|
tagName |
String :
Tag to handle. |
cssClass |
String :
Tag CSS class. |
block |
boolean :
True to enable block tag. |
spaced |
boolean :
True to enable spacing.
|
Marks given tagName
as block tag. For spaced
blocks parser will add empty lines around.
Parameters | |
---|---|
tagName |
String :
Tag to handle. |
block |
boolean :
True to enable block tag. |
spaced |
boolean :
True to enable spacing.
|
Marks given tagName
as block tag if tag contains attribute
that exactly equals value
.
For spaced
blocks parser will add empty lines around.
Parameters | |
---|---|
tagName |
String :
Tag to handle. |
attribute |
String :
Tag attribute. |
value |
String :
Attribute value. |
block |
boolean :
True to enable block tag. |
spaced |
boolean :
True to enable spacing.
|
Marks given tagName
as tag that may contain color attribute or CSS style if tag contains
cssClass
in class attribute. Parser will handle these cases automatically.
Parameters | |
---|---|
tagName |
String :
Tag to handle. |
cssClass |
String :
Tag CSS class.
|
Marks given tagName
as tag that may contain color attribute or CSS style. Parser will handle
these cases automatically.
Parameters | |
---|---|
tagName |
String :
Tag to handle.
|
Marks given tagName
as tag that may contain color attribute or CSS style if tag contains
attribute
that exactly equals value
. Parser will handle these cases automatically.
Parameters | |
---|---|
tagName |
String :
Tag to handle. |
attribute |
String :
Tag attribute. |
value |
String :
Attribute value.
|
Marks given tagName
as preformatted if tag contains attribute
that exactly
equals value
. In this mode all tabs, spaces and line breaks will be taken into account.
Parameters | |
---|---|
tagName |
String :
Tag to handle. |
attribute |
String :
Tag attribute. |
value |
String :
Attribute value. |
preformatted |
boolean :
True to enable preformatted tag.
|
Marks given tagName
as preformatted if tag contains cssClass
in class attribute.
In this mode all tabs, spaces and line breaks will be taken into account.
Parameters | |
---|---|
tagName |
String :
Tag to handle. |
cssClass |
String :
Tag CSS class. |
preformatted |
boolean :
True to enable preformatted tag.
|
Marks given tagName
as preformatted. In this mode all tabs, spaces and line breaks
will be taken into account.
Parameters | |
---|---|
tagName |
String :
Tag to handle. |
preformatted |
boolean :
True to enable preformatted tag.
|
Add tag to handle. Given tagName
will be replaced with span defined by spanType
if tag contains attribute
that exactly equals value
.
Parameters | |
---|---|
tagName |
String :
Tag to handle. |
attribute |
String :
Tag attribute. |
value |
String :
Attribute value. |
tag |
int :
Tag type.
|
Add tag to handle. Given tagName
will be replaced with span defined by tag
.
Parameters | |
---|---|
tagName |
String :
Tag to handle. |
tag |
int :
Tag type.
|
Add tag to handle. Given tagName
will be replaced with span defined by tag
if tag contains cssClass
in class attribute.
Parameters | |
---|---|
tagName |
String :
Tag to handle. |
cssClass |
String :
Tag CSS class. |
tag |
int :
Tag type.
|
Return linked ChanMarkup
instance.
Parameters | |
---|---|
object |
Object :
Linked object: ChanConfiguration , ChanPerformer ,
ChanLocator or ChanMarkup . |
Returns | |
---|---|
T |
ChanMarkup instance.
|
Calls when client want to determine tag's supportability. This method must return whether board support given tag.
Parameters | |
---|---|
boardName |
String :
Board name to check. |
tag |
int :
Tag to check. |
Returns | |
---|---|
boolean |
True if tag is supported, false otherwise. |
Calls when client want to show posting activity.
Parameters | |
---|---|
boardName |
String :
Board name string. |
Returns | |
---|---|
CommentEditor |
CommentEditor instance.
|
This method calls every time HTML parser reaches links to other posts like >>12345678
.
You can leave this method not overridden, but overriding can make this method much faster and more correct in some cases.
You must return a Pair
of strings where the first string is thread number and the second string is
post number. You can return both values as null: null thread number means this thread, null post number means
original post.
Parameters | |
---|---|
uriString |
String :
Parsed URI string. |
Returns | |
---|---|
Pair<String, String> |
Pair of strings. |