Commit graph

1258 commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
b485fb20dd Merge branch 'MDL-49693-master' of git://github.com/merrill-oakland/moodle
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2015-04-02 11:05:32 +02:00
Rajesh Taneja
bed97c39eb MDL-49513 behat: Set admin config using php api
Added a new set to set config using set_config() api
to make steps faster and more efficient
2015-04-01 14:25:23 +08:00
Damyon Wiese
2112dd44e8 MDL-49578 TinyMCE: Update to 3.5.11 2015-03-31 19:38:53 +01:00
Dan Poltawski
3d8b835aec Merge branch 'MDL-49564-master' of git://github.com/merrill-oakland/moodle
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2015-03-31 19:25:10 +01:00
Eric Merrill
9029ce75eb MDL-49693 atto: Clean textarea contents before inserting into editor 2015-03-27 12:27:00 -04:00
Eric Merrill
8e202bd80a MDL-49686 atto: Process style and class attributes in sub-functions
To ensure we only clean style and classes, first we select the inside
of those attributes and "replace" them with handler functions. Those
functions scan the actual attribute values for class or styles that
we want to exclude.

The first level regex has 3 groups. group1 selects everything in the
tag leading up to the attribute values, group2 has the attributes,
group3 has the trailing quote mark. We work on group2 then return
the combination of group1, group2, and group3.
2015-03-27 11:36:05 -04:00
Eric Merrill
73e144334b MDL-49671 atto: Any pastes that don't have html should clean everything
Browsers may not provide html content in the clipboard object event
though it will really be pasted as such. This includes Firefox on
Windows, Internet Explorer, and some niche cases in Safari.

Because of this, we need to scrub the entire editor anytime we can't
intercept a paste event.

In some magical day in the future when there is better cross browser
support, we can undo this.
2015-03-26 23:31:05 -04:00
Eric Merrill
1b6ce030d3 MDL-49564 atto: Improve empty span removal
Paste from MS word, followed by cleaning, may leave many many unused
spans. Try to remove them.
2015-03-26 23:05:23 -04:00
David Monllao
cfb32192d6 MDL-47002 editor_atto: Remove all after html when pasting 2015-03-26 16:15:29 +08:00
David Monllao
d784f5edc3 MDL-47002 editor_atto: Clean the comments separately 2015-03-26 14:37:55 +08:00
Eric Merrill
665829ec2a MDL-47002 atto: Prevent removal of Rangy spans 2015-03-25 10:02:43 -04:00
Dan Poltawski
db8a3b2eb9 Merge branch 'MDL-46746-master' of git://github.com/merrill-oakland/moodle
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2015-03-24 11:04:04 +00:00
Eric Merrill
6ea68e233a MDL-49565 atto: Allow html comments in editor code 2015-03-18 12:28:02 -04:00
Eric Merrill
df7a9fd4ba MDL-46746 atto: Remove unnecessary filtering of unicode characters 2015-03-18 12:04:31 -04:00
Eric Merrill
3ef9636190 MDL-47003 atto: Make code cleanup more targeted
Apply different, stricter, code cleanup when we receive HTML (WYSIWYG)
paste events, but be more lax the rest of the time.

Also, update the regexes to be more targeted for specific code patterns
pasted from office packages.
2015-03-18 11:44:11 -04:00
Eric Merrill
a7fdadc94c MDL-47002 atto: Improve paste behaviour to ensure propper cleanup
Old code failed to clean the editor div which resulted in
undesirable code being being left in the div for editing. To properly
handel incoming code, we should try to intercept and clean before the
paste, or clean the entire editable div.
2015-03-18 09:27:44 -04:00
David Monllao
ceba96bbca Merge branch 'MDL-49256-master' of git://github.com/andrewnicols/moodle
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2015-03-10 17:42:35 +08:00
Andrew Nicols
c4e2c67134 MDL-49256 atto: Check form existence before resetAutosave 2015-03-06 11:26:41 +08:00
Frederic Massart
39c6f62d03 MDL-49107 atto_link: Insert link even when selection is empty 2015-02-25 16:33:58 +01:00
Paul Nicholls
10fae2779e MDL-48973 Atto: Atto does not listen to the drop event
The 'drop' event fires before the native ContentEditable drop handler, so
in order to update the underlying textarea we need to call updateOriginal
with a brief delay so that the dropped content has actually been added to
the editor.
2015-02-13 14:48:12 +13:00
David Monllao
4879ea0e18 MDL-47159 atto_link: Adding prefix when url doesn't specify one 2015-02-04 10:23:04 +08:00
Eloy Lafuente (stronk7)
c5c34b4019 Revert "Merge branch 'MDL-47159_master' of git://github.com/dmonllao/moodle"
This reverts commit 73bf1119dd, reversing
changes made to 7615deba22.
2015-01-28 21:13:42 +01:00
Eloy Lafuente (stronk7)
8181ab5865 Merge branch 'MDL-48620-master' of git://github.com/andrewnicols/moodle
Conflicts:
	lib/editor/atto/plugins/undo/yui/build/moodle-atto_undo-button/moodle-atto_undo-button-min.js
2015-01-28 01:02:54 +01:00
Eloy Lafuente (stronk7)
73bf1119dd Merge branch 'MDL-47159_master' of git://github.com/dmonllao/moodle 2015-01-27 21:18:24 +01:00
David Monllao
58f2c3ca5c MDL-47159 atto_link: Adding prefix when url doesn't specify one 2015-01-27 10:43:29 +08:00
Eloy Lafuente (stronk7)
c07962d56d Merge branch 'MDL-48916' of https://github.com/wesleysitu/moodle 2015-01-27 01:06:43 +01:00
Eloy Lafuente (stronk7)
d82ab7bf22 Merge branch 'MDL-48616-master' of git://github.com/jethac/moodle 2015-01-26 23:47:14 +01:00
Andrew Nicols
557f44d970 MDL-48620 JavaScript: Updated shifted files to comply with coding style 2015-01-23 14:51:24 +08:00
Wesley Situ
7be4cf1873 MDL-48916 atto_undo: Clarify text for "Undo/Redo" 2015-01-20 16:21:35 -08:00
Narissa Bayler
1e65cb2557 MDL-48616 editor_atto: add macrons to atto charmap 2015-01-21 01:12:22 +08:00
Eloy Lafuente (stronk7)
782ea98c59 Merge branch 'MDL-47166-master' of git://github.com/andrewnicols/moodle 2015-01-20 16:14:26 +01:00
Dave Cooper
369a63ac1c MDL-47935 Atto: Moved atto notification message position 2015-01-09 15:53:19 +08:00
Andrew Nicols
455c8cdee6 MDL-47166 atto_indent: Swap Outdent and Indent 2015-01-09 09:21:13 +08:00
Daniel Thies
eb8b2425a6 MDL-48062 atto_image: Add image select on single click 2014-12-18 18:26:28 -06:00
Sam Hemelryk
7622b02f4c Merge branch 'MDL-43996-master' of git://github.com/jethac/moodle 2014-12-09 10:56:53 +13:00
Paul Nicholls
1461aee88a MDL-43996 editor_atto: add image drag and drop capability
Adds the ability to drag and drop images directly into Atto, uploading the image and embedding it
correctly. Contains fixes from 1.0.2, as well as a policy change - images dragged and dropped into
Atto now have role=presentation by default.
2014-12-05 11:32:32 +08:00
Sam Hemelryk
d125c7d238 MDL-47133 editor_atto: fixed lint errors 2014-12-01 10:36:23 +13:00
Sam Hemelryk
231cb5e3d4 Merge branch 'MDL-47133-master' of git://github.com/FMCorz/moodle 2014-12-01 10:34:18 +13:00
Andrew Nicols
64e7aa4de1 MDL-28286 JavaScript: Convert all uses of M.str to M.util.get_string 2014-12-01 08:32:04 +13:00
Frederic Massart
04b12fc1b3 MDL-47133 editor_atto: Use strict validation of keyboard shortcuts 2014-11-26 17:41:05 +08:00
Dan Poltawski
1d9eb92ff3 Merge branch 'MDL-45867-master' of https://github.com/dthies/moodle 2014-11-24 17:11:14 +00:00
Dan Poltawski
17d4ff23ee Revert "MDL-46531 Make atto foreground colors and background colors configurable"
This reverts commit cb6e1d5270.

This reverts commit 7a5e605424, reversing
changes made to 7b9fb265d2.

This reverts commit 06404b0118, reversing
changes made to 0f87473fed.

Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-11-20 07:04:41 +00:00
Andrew Nicols
cb6e1d5270 MDL-46531 editor_atto: fontcolor -> backcolor 2014-11-20 10:46:04 +08:00
Andrew Nicols
db97ff0ee6 MDL-46531 editor_atto: Handle a null selection better on colour change
Sadly, there is no easy way to do this. When a range is empty, we need to
create a new span, make the changes there, and then select it. Rangy does
not provide a helper to do this yet (will be in 1.3) so we have to do it
manually in the mean time.
2014-11-19 15:45:37 +08:00
Daniel Thies
3086c8cedb MDL-45867 atto_equation: Change preview update to asynchronous 2014-11-18 13:26:13 -06:00
Sam Hemelryk
06404b0118 Merge branch 'MDL-46531-master' of git://github.com/andrewnicols/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-11-18 10:48:31 +13:00
Daniel Thies
8bca3609ee MDL-48064 atto_editor: Expand event subscription for saving selection 2014-11-17 11:15:45 -06:00
Daniel Thies
9b9a3abf9b MDL-48064 atto_editor: Check if activeElement is child node in isActive 2014-11-14 11:49:15 -06:00
Eloy Lafuente (stronk7)
147bae8f7c MDL-48144 upgrade: add v2.8.0 sep lines 2014-11-10 18:08:15 +01:00
Eloy Lafuente (stronk7)
415fc3d2f9 Merge branch 'MDL-47943-master' of https://github.com/dthies/moodle 2014-11-06 18:44:38 +01:00