|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EditorActions
A set of handy editing actions that EditLive! knows how to perform.
Instance available via ELJBean.getEditorActions()
.
Method Summary | |
---|---|
int[] |
findTagAtLocation(HTML.Tag tag,
List<?> validTagAttrs,
int start,
int end)
Equivalent to selectTagAtCursor but does not use the editor selection. |
void |
selectLineAtCursor()
Select the entire line at the cursor (commonly used when triple clicking text) |
void |
selectTagAtCursor(HTML.Tag tag,
List<?> validTagAttrs)
Select as much text from the cursor as is covered by a given inline tag. |
void |
selectWordAtCursor()
Select the current word at the cursor (commonly used when double clicking text) |
Method Detail |
---|
void selectWordAtCursor()
void selectLineAtCursor()
void selectTagAtCursor(HTML.Tag tag, List<?> validTagAttrs)
selectWordAtCursor()
instead.
Because the Document
model often splits a single inline tag up into multiple content elements, finding the boundary between tags is
quite difficult. Under normal circumstances, two hyperlinks next to each other would both be selected by this algorithm if the only
matching performed was using tag == HTML.Tag.A
. The validTagAttrs parameter allows precise matching to be performed.
When the editor crosses a content element boundary during this search, it validates that all attribute names in validTagAttrs have the same value in both elements before continuing. This allows matching specific hyperlinks or span tags.
tag
- inline tag to search forvalidTagAttrs
- List of attribute names to match when moving between content elements. If empty, no matching is performed.int[] findTagAtLocation(HTML.Tag tag, List<?> validTagAttrs, int start, int end)
tag
- inline tag to search forvalidTagAttrs
- list of attribute names to matchstart
- location to start searching backwards through the documentend
- location to start searching forwards through the document
|
Copyright (c) 2005-2012 Ephox Pty Ltd. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |