<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web_editor/static/src/js/wysiwyg/plugin/text.js, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[REV] wev_editor, website: revert saas-12.2 editor</title>
<updated>2019-08-21T18:52:36+00:00</updated>
<author>
<name>Gorash</name>
<email>chm@odoo.com</email>
</author>
<published>2019-08-20T06:23:06+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=35b61822a8b12ebbdb455495479df6f2e13db03e'/>
<id>35b61822a8b12ebbdb455495479df6f2e13db03e</id>
<content type='text'>
This commit reverts the saas-12.2 editor by putting back the editor
of Odoo 12.

The saas-12.2 editor was an intermediate work between the previous
editor of Odoo 12 and the new one slated for Odoo 13. It was unstable
but it was supposed to be replaced by the new editor of version 13.

However, since the new editor has been postponed to Odoo 14, the
saas-12.2 one would have been staying in Odoo 13, which would have
been a nightmare to maintain. To avoid this outcome, we chose to
put back the 12.0 editor in its place.

This has the particular advantage that Odoo 13 will share the same
bugfixes as Odoo 12 and 11 as they all run under the same core
editor, while the saas-12.2 one would have been an entirely
different beast to maintain.

This is a partial revert of f2969923.

Part of PR 35677.

Co-authored-by: Nicolas Bayet &lt;nby@odoo.com&gt;
Co-authored-by: Antoine Guenet &lt;age@odoo.com&gt;
Co-authored-by: Christophe Matthieu &lt;chm@odoo.com&gt;
Co-authored-by: David Monjoie &lt;dmo@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit reverts the saas-12.2 editor by putting back the editor
of Odoo 12.

The saas-12.2 editor was an intermediate work between the previous
editor of Odoo 12 and the new one slated for Odoo 13. It was unstable
but it was supposed to be replaced by the new editor of version 13.

However, since the new editor has been postponed to Odoo 14, the
saas-12.2 one would have been staying in Odoo 13, which would have
been a nightmare to maintain. To avoid this outcome, we chose to
put back the 12.0 editor in its place.

This has the particular advantage that Odoo 13 will share the same
bugfixes as Odoo 12 and 11 as they all run under the same core
editor, while the saas-12.2 one would have been an entirely
different beast to maintain.

This is a partial revert of f2969923.

Part of PR 35677.

Co-authored-by: Nicolas Bayet &lt;nby@odoo.com&gt;
Co-authored-by: Antoine Guenet &lt;age@odoo.com&gt;
Co-authored-by: Christophe Matthieu &lt;chm@odoo.com&gt;
Co-authored-by: David Monjoie &lt;dmo@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: disable custom handling for Safari MacOS</title>
<updated>2019-08-07T10:09:28+00:00</updated>
<author>
<name>David Monjoie</name>
<email>dmo@odoo.com</email>
</author>
<published>2019-08-07T09:04:35+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d0e80593304415b605bc28f00239a391604a4fcf'/>
<id>d0e80593304415b605bc28f00239a391604a4fcf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: can use copy-past as html with only text</title>
<updated>2019-07-15T09:26:25+00:00</updated>
<author>
<name>Gorash</name>
<email>chm@odoo.com</email>
</author>
<published>2019-07-15T09:26:25+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=522a0001e7717449538a8f05c003582fe88cfda4'/>
<id>522a0001e7717449538a8f05c003582fe88cfda4</id>
<content type='text'>
Some browser can send text content without tag when past html. To avoid
this error we wrap the content before parse it with jQuery.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some browser can send text content without tag when past html. To avoid
this error we wrap the content before parse it with jQuery.</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: escape html tag when copy paste code and text content</title>
<updated>2019-06-04T08:15:48+00:00</updated>
<author>
<name>Gorash</name>
<email>chm@odoo.com</email>
</author>
<published>2019-06-04T08:15:48+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=5b41b5c563c75e18f4cf8d2f7dd66d5e273e4341'/>
<id>5b41b5c563c75e18f4cf8d2f7dd66d5e273e4341</id>
<content type='text'>
closes odoo/odoo#33859

Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#33859

Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: properly unformat text at the start of the DOM</title>
<updated>2019-04-30T08:45:05+00:00</updated>
<author>
<name>Antoine Guenet</name>
<email>age@odoo.com</email>
</author>
<published>2019-04-30T08:22:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6951521278ce3feb8fd6192a5afcfa5824ffab08'/>
<id>6951521278ce3feb8fd6192a5afcfa5824ffab08</id>
<content type='text'>
When trying to remove a format (bold, italic, underline), collapsed at
the start of the DOM, an error occurred because of a wrong range.
Ex.: `&lt;p&gt;&lt;b&gt;Odoo&lt;/b&gt;&lt;/p&gt;` -&gt; when clicking before the word "Odoo", then
clicking the "bold" button, we expect to be able to start writing in
plain (not bold) text (for that, the DOM has to look like this:
`&lt;p&gt;\u200B&lt;b&gt;Odoo&lt;/b&gt;&lt;/p&gt;`). We now have that proper behavior without
the accompanying error message and loss of selection.

Task ID: 1978515

closes odoo/odoo#33038

Signed-off-by: Pierre Paridans &lt;pparidans@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When trying to remove a format (bold, italic, underline), collapsed at
the start of the DOM, an error occurred because of a wrong range.
Ex.: `&lt;p&gt;&lt;b&gt;Odoo&lt;/b&gt;&lt;/p&gt;` -&gt; when clicking before the word "Odoo", then
clicking the "bold" button, we expect to be able to start writing in
plain (not bold) text (for that, the DOM has to look like this:
`&lt;p&gt;\u200B&lt;b&gt;Odoo&lt;/b&gt;&lt;/p&gt;`). We now have that proper behavior without
the accompanying error message and loss of selection.

Task ID: 1978515

closes odoo/odoo#33038

Signed-off-by: Pierre Paridans &lt;pparidans@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: properly paste text in non-HTML fields</title>
<updated>2019-04-25T11:33:00+00:00</updated>
<author>
<name>Antoine Guenet</name>
<email>age@odoo.com</email>
</author>
<published>2019-04-25T10:41:15+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=fe2496350ce13e1dadb54102893abeb92747005d'/>
<id>fe2496350ce13e1dadb54102893abeb92747005d</id>
<content type='text'>
This resolves an issue with pasting in text only mode (no HTML): the
list of nodes to paste was being modified with the `_mergeAdjacentULs`
method which is irrelevant to text nodes. Because of that, a corrupted
list of nodes was inserted into the DOM.

opw-1962743

closes odoo/odoo#32454

Signed-off-by: Pierre Paridans &lt;pparidans@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This resolves an issue with pasting in text only mode (no HTML): the
list of nodes to paste was being modified with the `_mergeAdjacentULs`
method which is irrelevant to text nodes. Because of that, a corrupted
list of nodes was inserted into the DOM.

opw-1962743

closes odoo/odoo#32454

Signed-off-by: Pierre Paridans &lt;pparidans@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web_editor,*: Refactoring the wysiwyg editor and 'html' field</title>
<updated>2019-01-17T08:40:21+00:00</updated>
<author>
<name>Christophe Matthieu</name>
<email>chm@odoo.com</email>
</author>
<published>2019-01-10T11:07:17+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f296992317e96562c66bd7ad59a5080d6c551ed5'/>
<id>f296992317e96562c66bd7ad59a5080d6c551ed5</id>
<content type='text'>
* Creating a new structure by transforming all the plugins in the
  library using the odoo inheritance system. Plugins are easier to
  implement with the AbstractPlugin to add Odoo behaviors.

* From now on, the methods of the library (in this case Summernote) can
  no longer be called by other modules or files. Only the wysiwyg
  widgets can access it, to simplify the updating process. The wysiwyg
  object serves as an interface.

* Depending on the options the snippets will be loaded or not, the
  editor will be in an iframe or not... all of this is transparent from
  the outside.

* Regarding iframes, all controllers related to editing have been
  removed: the new API no longer needs them. This speeds up loading,
  eases testing and removes complexity for the same
  features.

PUBLIC FEATURES

There are several public methods on the Wysiwyg class:
* Wysiwyg.prepare (WidgetParent): returns a deferred resolved when the
  library (xml, lazy, assets...) is loaded.
* Wysiwyg.getRange (DOM): returns the range (selection in the dom)
* Wysiwyg.setRange (startNode, startOffset, endNode, endOffset): creates
  a range (selection in the dom)
* Wysiwyg.setRangeFromNode (DOM, options) that creates a range from an
  element (option available to select all, start or end)

A jQuery selector was added: :o_editable, which indicates whether the
current element is editable. That is, if it is contained in a tag with
the attribute 'contentEditable = "true"' or in a tag with the class
o_editable.
Several methods are also present:
* focusIn: makes a focus and places the cursor at the beginning of the
  element
* focusInEnd: makes a focus and places the cursor at the end of the
  element
* selectContent: makes a focus and selects the content

HTML FIELD

The HTML field can receive different options:
* style-inline: {boolean} transforms a class into an inline style when
  saving and vice versa when reading.
* no-attachment: {boolean} prevents the use of attachments (in media
  dialog)
* cssEdit: {xml_id} to use a template containing the css to loaded in
  an iframe when editing
* cssReadonly: {xml_id} to use a template containing the css to load
  into an iframe when viewing in readonly
* snippets: {xml_id} snippets template (can be used with or without
  cssEdit)
* wrapper: {template} qweb static template (containing a tag:
  id = "wrapper") that will include the content during editing (removed
  on save)

MASS MAILING

A widget was created for mass mailing. There are now two fields:
body_html and body_arch.
body_arch contains the code with the class without conversion into
inline style, useful when editing and one with the inline style that is
visible in readonly mode and sent by email.
Advantage: no spreading errors, able to update css/theme, able to do
more changes when converting to inline style so that a maximum of mail
clients have an impeccable rendering.

Co-authored-by: Antoine Guenet &lt;age@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Creating a new structure by transforming all the plugins in the
  library using the odoo inheritance system. Plugins are easier to
  implement with the AbstractPlugin to add Odoo behaviors.

* From now on, the methods of the library (in this case Summernote) can
  no longer be called by other modules or files. Only the wysiwyg
  widgets can access it, to simplify the updating process. The wysiwyg
  object serves as an interface.

* Depending on the options the snippets will be loaded or not, the
  editor will be in an iframe or not... all of this is transparent from
  the outside.

* Regarding iframes, all controllers related to editing have been
  removed: the new API no longer needs them. This speeds up loading,
  eases testing and removes complexity for the same
  features.

PUBLIC FEATURES

There are several public methods on the Wysiwyg class:
* Wysiwyg.prepare (WidgetParent): returns a deferred resolved when the
  library (xml, lazy, assets...) is loaded.
* Wysiwyg.getRange (DOM): returns the range (selection in the dom)
* Wysiwyg.setRange (startNode, startOffset, endNode, endOffset): creates
  a range (selection in the dom)
* Wysiwyg.setRangeFromNode (DOM, options) that creates a range from an
  element (option available to select all, start or end)

A jQuery selector was added: :o_editable, which indicates whether the
current element is editable. That is, if it is contained in a tag with
the attribute 'contentEditable = "true"' or in a tag with the class
o_editable.
Several methods are also present:
* focusIn: makes a focus and places the cursor at the beginning of the
  element
* focusInEnd: makes a focus and places the cursor at the end of the
  element
* selectContent: makes a focus and selects the content

HTML FIELD

The HTML field can receive different options:
* style-inline: {boolean} transforms a class into an inline style when
  saving and vice versa when reading.
* no-attachment: {boolean} prevents the use of attachments (in media
  dialog)
* cssEdit: {xml_id} to use a template containing the css to loaded in
  an iframe when editing
* cssReadonly: {xml_id} to use a template containing the css to load
  into an iframe when viewing in readonly
* snippets: {xml_id} snippets template (can be used with or without
  cssEdit)
* wrapper: {template} qweb static template (containing a tag:
  id = "wrapper") that will include the content during editing (removed
  on save)

MASS MAILING

A widget was created for mass mailing. There are now two fields:
body_html and body_arch.
body_arch contains the code with the class without conversion into
inline style, useful when editing and one with the inline style that is
visible in readonly mode and sent by email.
Advantage: no spreading errors, able to update css/theme, able to do
more changes when converting to inline style so that a maximum of mail
clients have an impeccable rendering.

Co-authored-by: Antoine Guenet &lt;age@odoo.com&gt;</pre>
</div>
</content>
</entry>
</feed>
