summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/lib/summernote/src/js/module
AgeCommit message (Collapse)Author
2021-02-22[FIX] web_editor: fix anchor range selectionxO-Tx
When we double click a form submit anchor, and depending on the selected element before click, the selection range ("document.getSelection()") can start from a parent of the targeted node. This will send a wrong range to be used in LinkDialog widget. The goal of this commit is to prevent this behaviour by adjusting the range if it starts from anchor parent. Note: the bug only occurred in Firefox. Part of https://github.com/odoo/odoo/pull/62206 task-2381305 closes odoo/odoo#62206 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-22[FIX] website_form, *: allow to update buttons using link dialogxO-Tx
*: web_editor, website_mass_mailing When we double click a link/button, a link dialog appears to update the target properties, and since the current link dialog can only handle anchor targets, using it on buttons leads to some inconsistencies : - visible href options for button & url required to save changes. - missing preview when button style changed. ... The goal of this commit is to add a fix (with minimum of code) on summernote linkdialog to handle button elements using the same logic as anchor nodes. Also, update website form test tour to test those new changes. Part of https://github.com/odoo/odoo/pull/62206 task-2381305
2021-02-19[FIX] web_editor: fix anchor click on submit buttonxO-Tx
Context: 1) Edit mode 2) Click on anchor edition button of website form submit button 3) Traceback occurs The "focus" triggered on $editable element in editor's 'getLinkInfo()' discards user's text selection on submit button, as a result, 'range.create()' method returns null since no selection is found. Note: the bug only occurred in Chrome. Note 2: [1] apparently tried to solve the same issue but the fix was not solving it correctly, at least not in all cases. [1]: https://github.com/odoo/odoo/commit/da14e4449e5e318eb72e1b9f268fb797adb0c6a6 opw-2443441 closes odoo/odoo#66552 X-original-commit: d2f3c9e7975188753fa17c06db3fc5c73c773944 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-05[FIX] web_editor: fix duplicated pasted image summernotejvm-odoo
Issue - Windows > Chrome or Firefox - Any chatter > Open full screen - Paste any image The image is pasted twice Cause Summernote adds the image but the browser event adds it too Solution I applied the fix that summernote did summernote/summernote/commit/6e432941af17c5fee0877d9ff54b6ace65fbdb4b OPW-2267712 closes odoo/odoo#52532 X-original-commit: 2b4b2ce8660326b1cb53b5624690718b89aaceda Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-01-29[FIX] web_editor: properly copy link URLAntoine Prieels
Avoid display errors with special characters when copying the href attribute of links in the web editor. opw-2078313 closes odoo/odoo#44176 X-original-commit: 19ebcdd20426406250174eb473b081a9e488e542 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-06[FIX] web_editor: fix summernote text drop on firefoxJason Van Malder
Issue - Have firefox - Go to any chatter - Open full editor - Write some "test" words with line breaks - Select one of your "test" words - Drag & drop it somewhere else in the editor Welcome on test.com! (redirected) Cause Summernote doesn't preventDefault on drop event, so firefox think we want to go to another URL. Solution Add the preventDefault manually. This reveals another issue which is solved by importing this PR's code https://github.com/summernote/summernote/pull/3327 (with adaptation for our dinosaurus version) OPW-2158112 closes odoo/odoo#42759 X-original-commit: 197145ac19fd65dcfbcbae81c8b5dd54025185a4 Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
2019-08-21[REV] web_editor: revert summernote updateGorash
Summernote was updated alongside the new editor of saas-12.2. However, since we are putting back the editor of 12.0, summernote needs to be downgraded back to the version that was compatible with the 12.0 editor. This is a revert of 17c6d005. Part of PR 35677. Co-authored-by: Nicolas Bayet <nby@odoo.com> Co-authored-by: Antoine Guenet <age@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com>
2019-01-17[IMP] web_editor,*: Update the Summernote libraryChristophe Matthieu
The refactoring of the wysiwyg editor and 'html' field allow for the update of the Summernote library.
2018-07-27[REF] web_editor: make our Summernote/BS3 work with BS4qsm-odoo
The big plan is to remove our current editor and its customization and replace it with an updated summernote. Meanwhile, we have to patch our current lib directly so that it works with BS4.
2018-07-27[REF] *: BS4, 'pull-left/right' -> 'float-left/right'qsm-odoo
2018-07-27[REF] *: BS4, replace img-rounded/img-circle classesqsm-odoo
'img-rounded' -> 'rounded' 'img-circle' -> 'rounded-circle'
2018-06-14[MERGE] forward port branch 9.0 up to 90165e2d96aChristophe Simonis
2018-06-13[FIX] web_editor: link don't duplicate child textNicolas Lempereur
If we applied a link eg. on: ``` <span>hello <b>world</b></span> ``` The system actually gets the "label": hello worldworld because there is 3 nodes: text node: hello element node: `<b>world</b>` text node: world Also since "hello worldworld" is different than "hello world", instead of just keeping existing nodes and adding the link, the system would replace the selected range by: `<span><a>hello worldworld</a></span>' instead of: `<span><a>hello </a><b><a>world</a></b></span>` This commit ignores element nodes when creating a new link, since when getting the label of the link from the selection, only the text nodes insides the element nodes have any interest. There was a second issue because if we had: ``` <i><a href="hello">world</a></i>! ``` and tried to put a link over "world!", the code would decide: "world" is inside a link so we will just update that link. Thus we would get: ``` <i><a href="hello">world!</a></i>! ``` instead of: ``` <i><a href="hello">world</a></i><a href="hello">!</a> ``` opw-1848351 closes #25187
2018-05-02[MERGE] forward port branch 9.0 up to 532b11ce415Christophe Simonis
2018-04-27[FIX] web_editor: update summernote copy-paste featureqsm-odoo
The copy-paste feature of summernote was messy and led most of the time to breaking the template you were trying to edit. While it is difficult to solve as it mostly comes from the lib itself and that the lib is in a complicated state as Odoo had to overridde part of its internal code for its own purposes, this commit hopes to solve the problem by updating only the copy-paste feature to the latest summernote version. Of course, as summernote changed a lot meanwhile, it was not possible to just take the up-to-date summernote file. This commit refactores the up-to-date summernote clipboard code so that it fits the old summernote version Odoo is using. Note: the main problems occurred while using Windows/Mac and not Linux. opw-1837818
2017-10-17[MERGE] forward port branch 9.0 up to d5c0cae60b5Christophe Simonis
2017-10-16[FIX] web_editor: do not break <p/> when pasting a <p/> elementqsm-odoo
This fixes a bug when pasting text in a paragraph, it was always creating a new paragraph for no reason.
2016-09-21[FIX] mass_mailing: can't change color button snippet when edit mass mailingChristophe Matthieu
2016-01-20[FIX] web_editor: merge span when paste, only if no content between tagsChristophe Matthieu
opw-667263
2016-01-20[FIX] web_editor: remove empty table ligne when paste contentChristophe Matthieu
2016-01-14[FIX] web_editor: paste simple text must wrap first line by p and remove ↵Christophe Matthieu
unless font
2016-01-11[FIX] web_editor: clean pasted dom and avoid crappy domChristophe Matthieu
Chrome on windows add few comment tags and insert unwanted span.
2015-10-02[FIX] web_editor, mass_mailing: summernote oversight and videoNicolas Lempereur
* some oversight when updating summernote with d33086c, * fix style when replacing image with video
2015-09-29[IMP] web_editor: rename and delete summernote filesNicolas Lempereur
2015-09-29[IMP] web_editor: update summernote up to 2015-08-31Nicolas Lempereur
update summernote library up to revision: https://github.com/summernote/summernote/commit/a0f26e300 see https://github.com/summernote/summernote/ for history closes #8704
2015-09-25Revert "[IMP] web_editor: update summernote up to 2015-08-31"Nicolas Lempereur
Revert till several issues are solved.
2015-09-25[WIP] web_editor: rename and delete old summernote filesNicolas Lempereur
2015-09-25[IMP] web_editor: update summernote up to 2015-08-31Nicolas Lempereur
update summernote library up to revision: https://github.com/summernote/summernote/commit/a0f26e300 see https://github.com/summernote/summernote/ for history closes #8704
2015-07-10[IMP] web_editor: move summernote & nearest lib from websiteChristophe Matthieu