| Age | Commit message (Collapse) | Author |
|
|
|
- Make sure icon colors can be edited the same way as text
- Improve recent color behavior
|
|
Commit 906875fc78cb80f6c3d5f1f14f997008cd406473 (followed by commit
76be5eed449c78eaf0b4208c381169132492ab4a) tried to tweak to copy/paste
functionality of the editor.
Indeed, in PDF file, when copying a paragraph, a line feed is added at
each forced line break (page width end). This forced a line feed and
a new paragraph in the pasted text. The goal was to get rid of those
useless linebreaks when pasting.
The ideal solution would be to detect that the text was copied from
a PDF but it is not possible. However, this commit improves the
heuristic: if this is not plain text, then nothing is done, the content
is pasted normally. If it is plain text (like when copying from pdf),
then each line break which is surrounded by letters or numbers is
considered an useless line break and replaced by a space. This is
obviously not perfect but the previous implementation was really wrong
(it was removing line breaks which were not preceeded by punctuation in
all cases, which was removing lots of useful line breaks).
Note: this commit also fixes a bug -> text was not able to be pasted
with Internet Explorer.
opw-715920
|
|
|
|
|
|
An italic node would be taken as a basic node containing text and thus
would be merged unexpectedly.
For example with the following content : "<i>hello</i> world" removing a
letter of 'world' would merge the text node with hello making it italic.
opw-703722
|
|
|
|
|
|
|
|
opw-686393
|
|
|
|
When pasting, the paste event is cancelled and done back with the
corrected data.
This works fine on firefox, but this can have unwanted results on other
browser like pasting two times or copying the end of the line at the
beginning.
This commit replace completely the summernote functionality with our
small implementation of pasting corrected text.
closes #14043
opw-690814
|
|
The image icon was not clear enough. The editor bar appears in the
website builder, the mail composer, the forum composer, ... In each
of them, we can both link a picture or a file but a picture makes
more sense in some context and in some other ones not.
This commit solves the problem by changing the icon to fa-file-image-o
which is a mixed of file and image. This also solves the problem of
having two buttons with the image icon in the website builder (indeed
an image icon is also used for the image look button).
|
|
* On firefox, you had to click twice on a link to be able to start
typing text
* When selecting text which contained a <br/>, you were not able to
replacing it correctly (you had to click again before starting typing)
* When replacing a whole paragraph content which was below a title,
the text was not replaced and you had to click again and the title
transformed into a paragraph.
* ...
|
|
|
|
Users copy/past text from various king of document into the editor.
These texts contain useless line breaks that should be removed before
pasting. Also, the editor currently add a paragraph element between
each line.
To correct this behaviour the onPaste callback of the summernote lib
is used. However for some reason, this is triggered after the text
is pasted (we should update and refactor the lib in a better way).
So this commit uses a hack: undo the past thanks to the undo command
then paste the formatted text we want.
|
|
|
|
Before 3959afc the `node` tested would be the selection containing node,
but since then it may have been a `<br/>` which has some damaging
effects: now entering double enter at the end of a list, quote or code
block doesn't end this block.
Testing the use case corrected by 3959afc, the said change seems to have
no effect so this commit reverts it.
opw-667618
|
|
* Adapt DOM selectors
* Refactore dialog XMLs to have odoo styling
* New editor options (background-position, ...)
* Various improvements
|
|
|
|
last char of the last line of the td
|
|
issue: the user select some line and keypress tab without indent, and the button indent doesn't work in table cell
|
|
issue: event does not a global var in firefox, and event is already prevented
|
|
Chrome on windows add few comment tags and insert unwanted span.
|
|
can be raise an exception
|
|
|
|
|
|
Depending of the location where the "Copying" happened, only text/plain
content could be available from the clipboard component.
So if no text/html was retrieved, we should fall back to plain text
pasting.
closes #9787
opw-657137
|
|
Summernote sometimes doesn't take into account HTML comment could be
embedded in the edited content, this can lead to issue since this
situation can happen in Odoo.
This commit patch the "isVisiblePoint" summernote's function to take
care of this issue.
opw-656332
|
|
Issue: click on an image or create a text selection and click on delete, the char after the selection is removed
|
|
|
|
|
|
|
|
|
|
(remove tr but not td alone)
|
|
|
|
The paste don't keep the architecture, usability team want to past the architecture but remove extra style and wrong node like span.
|
|
When using the tab key on non text node range, it could fail in some
given case.
Also when removing the last element of the table row, a correction was done in
d33086c03fc but if there was no element before the table (eg. the editor
is empty) an error could occur.
|
|
Tests for null range were not done in #8845, so in given case (where the
focus is not in the editor) we could get an issue.
The code for remembering the selection when clicking the editor
was made useful in d33086c03fc, but there was an edge case when
the editor itself was in a modal: then the selection would be lost.
This commit change the code as following:
1) restore the selected range if:
- the current selected range is not in the editable of the active editor
- there is a corresponding saved selected range or we are in an embeded
editor (and not in air mode as when editing the website)
2) save the selected range if:
- we don't restore the selection,
- the current selected range is in the active editor editable area
|
|
The range can be null if the focus is not in the editor at serveral
places.
closes #8845
|
|
Put all rng to r to have the same concept in the whole file as well as
in the summernote codebase.
closes #8845
|
|
On initialisation summernote call update method with oStyle.range is undefined.
The range can be undefined because the update is call before any selection and attach method from summernote call the update without range.
The method summernote_table_update try to use the range and raise an exception.
fix: Check if oStyle.range exits.
|
|
* some oversight when updating summernote with d33086c,
* fix style when replacing image with video
|
|
update summernote library up to revision:
https://github.com/summernote/summernote/commit/a0f26e300
see https://github.com/summernote/summernote/ for history
closes #8704
|
|
Revert till several issues are solved.
|
|
update summernote library up to revision:
https://github.com/summernote/summernote/commit/a0f26e300
see https://github.com/summernote/summernote/ for history
closes #8704
|
|
|
|
|
|
|
|
|