Commit Graph
12 Commits
Author SHA1 Message Date
lli e2b7b378f1 Uses the previous selection style for the newly inserted character when replacing text 2014-01-09 22:01:40 +11:00
Philip Peitsch 8de8dde612 Restore focus to the event trap if reset by an operation
With the event trap now being inside the cursor, any repositioning of
the cursor causes the document.activeElement and window selection to
change. This causes the document to stop being editable after actions
such as bolding current text.

Now, the focus state of the event trap is checked prior to each
operation, and will be reset back to the event trap if disrupted by an
operation. Note, checks are in place to prevent stealing focus if the
document is not active when an operation is executed.

Fixes issue #298
2014-01-08 21:32:10 +11:00
Friedrich W. H. Kossebau c2a795e668 Update link to repo: now https://github.com/kogmbh/WebODF/ 2013-10-23 18:20:30 +02:00
Friedrich W. H. Kossebau 508570dab8 Add copy of the AGPL3 to sources (+ add to created zip files) 2013-10-21 17:55:16 +02:00
Philip Peitsch a9aa4b3652 Provide access to more direct text styling functions
External editing features require some direct access along side the
eventing mechanism currently exposed. Additionally, there are more formatting
options available than DirectTextStyler supports in native functions.

By allowing access to the underlying function used to perform cursor
styling, external editors can easily provide support for custom text style
features (e.g., background colours etc.).
2013-10-17 23:36:04 +11:00
Philip Peitsch 71d757ce4c More tightly couple direct styling support to text manipulator
At this point, this is not intended to be open for extension as it is too
easy to break OT logic by incorrectly manipulating the operation groups.
Instead, convert this to use a specific-built extension point under tight
control of WebODF.
2013-10-16 01:31:38 +11:00
Philip Peitsch a589b36d61 Refresh the style information cache to account for any direct cursor styling 2013-10-15 23:10:00 +11:00
Philip Peitsch 33ce56c37a Refactored StyleHelper text queries (isBold etc.) to use a applied styles object
This improves the performance by reducing the number of times getAppliedStyles
is called (once per update, rather than once per property to check), and
paves the way for the direct cursor styling to be taken into account.
2013-10-15 23:09:59 +11:00
Philip Peitsch 0e778265f8 Add support for cursor-styling
Cursor styling allows the direct styling properties of the next inserted
text to be set. This means that the user can set text-related properties
(e.g., bold, underline, italic) without having an existing selection,
and the next entered character will have this formatting applied to it.

Known issues
- Undo/redo requires multiple steps. Should only be one. But, the current
undo manager design is not amenable to this type of change.
2013-10-15 23:09:59 +11:00
Friedrich W. H. Kossebau f46bb9e502 Change ops.OperationRouter.push to take a sequence of ops
Taking a sequence of ops also enables to give the guarantee that all
contained operations will be executed directly after each other,
in the given order. So creator of the ops can calculate the spec of each op
by relying on the known effect of the other ops.
2013-10-02 19:29:52 +02:00
Friedrich W. H. Kossebau c1c2d167c9 More API dox for DirectParagraphStyler & DirectTextStyler 2013-09-14 16:27:29 +02:00
Friedrich W. H. Kossebau eb57ef2def Add gui.DirectTextStyler, a UI-less tool specialized on direct styling of text 2013-09-10 13:02:28 +02:00