Commit Graph
27 Commits
Author SHA1 Message Date
lli 32f148930a Preserve the text style when splitting at the end of paragraph.
At the moment, splitting at the end of the following paragraph
<p style-name="standard">hello <span style-name="bold">world|</span></p>
will create a new paragraph like below
<p style-name="standard">|<span style-name="bold"></span></p>

The cursor is moved out of the span due to empty span is not considered as
a valid cursor position in the current design. this causes newly entered
text are not formatted correctly.

Merged DirectTextStyler and DirectParagraphStyler into
DirectFormattingController. These have become closely related concepts as
a result of changes in this patch.
2014-01-20 22:32:24 +11:00
Aditya Bhatt 6a4f0e69ab Add translations support to runtime.js,
and programs/editor/Translator.js which is a reference
implementations of a translator.
The programs/editor/Translator code is used entirely in
localeditor.js/collabeditor.js and the editor itself, or webodf,
and need not know anything about the translation mechanism.

Translate all strings within the editor and all
user-facing strings in webodf core itself using
runtime.tr();
2013-11-05 18:38:41 +01: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
lli 94ceb41a03 Disable font and paragraph formating toolbar items on the editor when image is selected.
LO/AOO actually hides those options.
2013-10-15 21:42:21 +11:00
Aditya Bhatt 30d8bff132 Stop handling keyboard input on the font size picker because dojo does
not yet afford enough control and we want to not let it steal focus.
2013-09-24 16:57:10 +02:00
Aditya Bhatt 5b3d1b2fcd Make onToolDone an overrideable member function that is called whenever
a tool is done. Now we don't pass onToolDone as a callback argument.
Make styles dialog, zoom slider, and other widgets restore focus to the
document once they are done.
2013-09-19 18:54:37 +02:00
Friedrich W. H. Kossebau 55d5ac8ac8 Add callback to set focus to canvas once done to most tools in the toolbar 2013-09-16 18:45:19 +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
Philip Peitsch d1cdcfb2cb Add direct font family and size styling support to Editor
* tweak fontPicker wrapper to be a little easier to use within other
  widgets
* keep annotation button stays in same position
2013-09-09 09:16:04 +02:00
Friedrich W. H. Kossebau 479ecd79f8 Turn widgets.js into Tools.js, make tools work without a editorSession object set 2013-09-03 01:02:47 +02:00
Lu Li c75f303cfb handle shortcuts for applying bold, italic & underline 2013-07-24 09:58:17 +02:00
Philip Peitsch 2fc0ab536c Editor style buttons shouldn't crash if selection has no applied styles 2013-07-15 09:40:50 +02:00
Philip Peitsch ec2e72a58b Editor uses direct formatting for applying font style changes 2013-07-02 21:19:36 +02:00
Jos van den Oever eecfa4d201 Remove trailing spaces and tabs. 2013-06-19 16:47:52 +02:00
Aditya Bhatt ad8199e4cd Don't fire onChange when setting BIUS checked-state programmatically 2013-05-23 14:46:03 +02:00
Friedrich W. H. Kossebau dade008500 Add core.EventNotifier, as generic notification handler for both ops.Session and EditoSession 2013-04-09 13:44:49 +02:00
Aditya Bhatt 8f526248f3 Add a signalParagraphStyleModified, and make the BIUS buttons listen to
it so that they are updated when a dialog changes the current style's properties
2013-02-20 13:35:47 +05:30
Aditya Bhatt 3c1ce46dac Add strikethrough support to the style modifier and restore the button
in simpleStyles.
Also add special CSS handling for it in Style2CSS
2013-02-20 13:35:47 +05:30
Aditya Bhatt e15e8ef80d Make B I U buttons work, and remove the strikethrough button for now 2013-02-20 13:35:47 +05:30
Aditya Bhatt 01634286bc Linted everything in editor/ 2012-12-28 12:05:06 +01:00
Aditya Bhatt 2453386448 Use de-globalized editorSession throughout editor 2012-12-28 12:05:06 +01:00
Tobias Hintze f2667f043f cleanup, whitespace, and cosmetics 2012-12-03 16:56:04 +01:00
Tobias Hintze 20accd4fd2 apply AMD pattern to programs/editor
* allows use either in src or in build dir (cdn-index.html / index.html)
* creates dojo-amalgamation.js which includes selected languages
2012-12-03 16:24:08 +01:00
Aditya Bhatt 71656d78d4 Remove all instances and usages of session, documentObject, and memberId from all editor components. Obsolte after using EditorSession
(Tobias Hintze <th-git@kogmbh.com>:
 manually resolved conflict in editor.js during cherry-pick)
2012-11-30 13:22:31 +01:00
Tobias Hintze 375457d233 update license and copyright headers 2012-10-21 20:46:20 +02:00
Aditya Bhatt c9d2c36aea Add new SimpleStyles widget with B, I, U, S buttons and icons. 2012-08-21 18:53:13 +05:30