Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit dfabf61

Browse files
committed
memory integration
1 parent cbbee25 commit dfabf61

File tree

57 files changed

+957
-582
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+957
-582
lines changed

examples/utils/jabberwocky.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,14 @@ He chortled in his joy.<br/>
3434
Did gyre and gimble in the wabe:<br/>
3535
All mimsy were the borogoves,<br/>
3636
And the mome raths outgrabe.<br/></i></p>
37+
<p>
38+
"Jabberwocky" has been translated into numerous languages,<sup>[31]</sup> as the novel has been <b>translated</b> into 65 languages.[32] The translation might be difficult because <i>the poem holds to English syntax and many of the principal words of the poem are invented. Translators have generally dealt with them by creating equivalent words of their own. Often these are similar in spelling or sound to Carroll's while respecting the morphology of the language they are being translated into. In Frank L. Warrin's French translation, "'Twas brillig" becomes "Il brilgue". In instances like this, both the original and the invented words echo actual words of Carroll's lexicon, but not necessarily ones with similar meanings. Translators have invented words which draw on root words with meanings similar to the English roots used by Carroll. Douglas Hofstadter noted in his essay "Translations of Jabberwocky", the word 'slithy', for example, echoes the English 'slimy', 'slither', 'slippery', 'lithe' and 'sly'. A French translation that uses 'lubricilleux' for 'slithy', evokes French words like 'lubrifier' (to lubricate) to give an impression of a meaning similar to that of Carroll's word. In his exploration of the translation challenge, Hofstadter asks "what if a word does exist, but it is very intellectual-sounding and Latinate ('lubricilleux'), rather than earthy and Anglo-Saxon ('slithy')? Perhaps<b> 'huilasse' would be better than</b> 'lubricilleux'? </i> Or does the Latin origin of the word 'lubricilleux' not make itself felt to a speaker of French in the way that it would if it were an English word ('lubricilious', perhaps)?
39+
<big>"Jabberwocky" has been translated into numerous languages,<sup>[31]</sup> as the novel has been <b>translated</b> into 65 languages.[32] The translation might be difficult because <i>the poem holds to English syntax and many of the principal words of the poem are invented. Translators have generally dealt with them by creating equivalent words of their own. Often these are similar in spelling or sound to Carroll's while respecting the morphology of the language they are being translated into. In Frank L. Warrin's French translation, "'Twas brillig" becomes "Il brilgue". In instances like this, both the original and the invented words echo actual words of Carroll's lexicon, but not necessarily ones with similar meanings. Translators have invented words which draw on root words with meanings similar to the English roots used by Carroll. Douglas Hofstadter noted in his essay "Translations of Jabberwocky", the word 'slithy', for example, echoes the English 'slimy', 'slither', 'slippery', 'lithe' and 'sly'. A French translation that uses 'lubricilleux' for 'slithy', evokes French words like 'lubrifier' (to lubricate) to give an impression of a meaning similar to that of Carroll's word. In his exploration of the translation challenge, Hofstadter asks "what if a word does exist, but it is very intellectual-sounding and Latinate ('lubricilleux'), rather than earthy and Anglo-Saxon ('slithy')? Perhaps<b> 'huilasse' would be better than</b> 'lubricilleux'? </i> Or does the Latin origin of the word 'lubricilleux' not make itself felt to a speaker of French in the way that it would if it were an English word ('lubricilious', perhaps)?
40+
"Jabberwocky" has been translated into numerous languages,<sup>[31]</sup> as the novel has been <b>translated</b> into 65 languages.[32] The translation might be difficult because <i>the poem holds to English syntax and many of the principal words of the poem are invented. Translators have generally dealt with them by creating equivalent words of their own. Often these are similar in spelling or sound to Carroll's while respecting the morphology of the language they are being translated into. In Frank L. Warrin's French translation, "'Twas brillig" becomes "Il brilgue". In instances like this, both the original and the invented words echo actual words of Carroll's lexicon, but not necessarily ones with similar meanings. Translators have invented words which draw on root words with meanings similar to the English roots used by Carroll. Douglas Hofstadter noted in his essay "Translations of Jabberwocky", the word 'slithy', for example, echoes the English 'slimy', 'slither', 'slippery', 'lithe' and 'sly'. A French translation that uses 'lubricilleux' for 'slithy', evokes French words like 'lubrifier' (to lubricate) to give an impression of a meaning similar to that of Carroll's word. In his exploration of the translation challenge, Hofstadter asks "what if a word does exist, but it is very intellectual-sounding and Latinate ('lubricilleux'), rather than earthy and Anglo-Saxon ('slithy')? Perhaps<b> 'huilasse' would be better than</b> 'lubricilleux'? </i> Or does the Latin origin of the word 'lubricilleux' not make itself felt to a speaker of French in the way that it would if it were an English word ('lubricilious', perhaps)?
41+
<small>"Jabberwocky" has been translated into numerous languages,<sup>[31]</sup> as the novel has been <b>translated</b> into 65 languages.[32] The translation might be difficult because <i>the poem holds to English syntax and many of the principal words of the poem are invented. Translators have generally dealt with them by creating equivalent words of their own. Often these are similar in spelling or sound to Carroll's while respecting the morphology of the language they are being translated into. In Frank L. Warrin's French translation, "'Twas brillig" becomes "Il brilgue". In instances like this, both the original and the invented words echo actual words of Carroll's lexicon, but not necessarily ones with similar meanings. Translators have invented words which draw on root words with meanings similar to the English roots used by Carroll. Douglas Hofstadter noted in his essay "Translations of Jabberwocky", the word 'slithy', for example, echoes the English 'slimy', 'slither', 'slippery', 'lithe' and 'sly'. A French translation that uses 'lubricilleux' for 'slithy', evokes French words like 'lubrifier' (to lubricate) to give an impression of a meaning similar to that of Carroll's word. In his exploration of the translation challenge, Hofstadter asks "what if a word does exist, but it is very intellectual-sounding and Latinate ('lubricilleux'), rather than earthy and Anglo-Saxon ('slithy')? Perhaps<b> 'huilasse' would be better than</b> 'lubricilleux'? </i> Or does the Latin origin of the word 'lubricilleux' not make itself felt to a speaker of French in the way that it would if it were an English word ('lubricilious', perhaps)?
42+
"Jabberwocky" has been translated into numerous languages,<sup>[31]</sup> as the novel has been <b>translated</b> into 65 languages.[32] The translation might be difficult because <i>the poem holds to English syntax and many of the principal words of the poem are invented. Translators have generally dealt with them by creating equivalent words of their own. Often these are similar in spelling or sound to Carroll's while respecting the morphology of the language they are being translated into. In Frank L. Warrin's French translation, "'Twas brillig" becomes "Il brilgue". In instances like this, both the original and the invented words echo actual words of Carroll's lexicon, but not necessarily ones with similar meanings. Translators have invented words which draw on root words with meanings similar to the English roots used by Carroll. Douglas Hofstadter noted in his essay "Translations of Jabberwocky", the word 'slithy', for example, echoes the English 'slimy', 'slither', 'slippery', 'lithe' and 'sly'. A French translation that uses 'lubricilleux' for 'slithy', evokes French words like 'lubrifier' (to lubricate) to give an impression of a meaning similar to that of Carroll's word. In his exploration of the translation challenge, Hofstadter asks "what if a word does exist, but it is very intellectual-sounding and Latinate ('lubricilleux'), rather than earthy and Anglo-Saxon ('slithy')? Perhaps<b> 'huilasse' would be better than</b> 'lubricilleux'? </i> Or does the Latin origin of the word 'lubricilleux' not make itself felt to a speaker of French in the way that it would if it were an English word ('lubricilious', perhaps)?
43+
</small>"Jabberwocky" has been translated into numerous languages,<sup>[31]</sup> as the novel has been <b>translated</b> into 65 languages.[32] The translation might be difficult because <i>the poem holds to English syntax and many of the principal words of the poem are invented. Translators have generally dealt with them by creating equivalent words of their own. Often these are similar in spelling or sound to Carroll's while respecting the morphology of the language they are being translated into. In Frank L. Warrin's French translation, "'Twas brillig" becomes "Il brilgue". In instances like this, both the original and the invented words echo actual words of Carroll's lexicon, but not necessarily ones with similar meanings. Translators have invented words which draw on root words with meanings similar to the English roots used by Carroll. Douglas Hofstadter noted in his essay "Translations of Jabberwocky", the word 'slithy', for example, echoes the English 'slimy', 'slither', 'slippery', 'lithe' and 'sly'. A French translation that uses 'lubricilleux' for 'slithy', evokes French words like 'lubrifier' (to lubricate) to give an impression of a meaning similar to that of Carroll's word. In his exploration of the translation challenge, Hofstadter asks "what if a word does exist, but it is very intellectual-sounding and Latinate ('lubricilleux'), rather than earthy and Anglo-Saxon ('slithy')? Perhaps<b> 'huilasse' would be better than</b> 'lubricilleux'? </i> Or does the Latin origin of the word 'lubricilleux' not make itself felt to a speaker of French in the way that it would if it were an English word ('lubricilious', perhaps)?
44+
"Jabberwocky" has been translated into numerous languages,<sup>[31]</sup> as the novel has been <b>translated</b> into 65 languages.[32] The translation might be difficult because <i>the poem holds to English syntax and many of the principal words of the poem are invented. Translators have generally dealt with them by creating equivalent words of their own. Often these are similar in spelling or sound to Carroll's while respecting the morphology of the language they are being translated into. In Frank L. Warrin's French translation, "'Twas brillig" becomes "Il brilgue". In instances like this, both the original and the invented words echo actual words of Carroll's lexicon, but not necessarily ones with similar meanings. Translators have invented words which draw on root words with meanings similar to the English roots used by Carroll. Douglas Hofstadter noted in his essay "Translations of Jabberwocky", the word 'slithy', for example, echoes the English 'slimy', 'slither', 'slippery', 'lithe' and 'sly'. A French translation that uses 'lubricilleux' for 'slithy', evokes French words like 'lubrifier' (to lubricate) to give an impression of a meaning similar to that of Carroll's word. In his exploration of the translation challenge, Hofstadter asks "what if a word does exist, but it is very intellectual-sounding and Latinate ('lubricilleux'), rather than earthy and Anglo-Saxon ('slithy')? Perhaps<b> 'huilasse' would be better than</b> 'lubricilleux'? </i> Or does the Latin origin of the word 'lubricilleux' not make itself felt to a speaker of French in the way that it would if it were an English word ('lubricilious', perhaps)?
45+
</big>"Jabberwocky" has been translated into numerous languages,<sup>[31]</sup> as the novel has been <b>translated</b> into 65 languages.[32] The translation might be difficult because <i>the poem holds to English syntax and many of the principal words of the poem are invented. Translators have generally dealt with them by creating equivalent words of their own. Often these are similar in spelling or sound to Carroll's while respecting the morphology of the language they are being translated into. In Frank L. Warrin's French translation, "'Twas brillig" becomes "Il brilgue". In instances like this, both the original and the invented words echo actual words of Carroll's lexicon, but not necessarily ones with similar meanings. Translators have invented words which draw on root words with meanings similar to the English roots used by Carroll. Douglas Hofstadter noted in his essay "Translations of Jabberwocky", the word 'slithy', for example, echoes the English 'slimy', 'slither', 'slippery', 'lithe' and 'sly'. A French translation that uses 'lubricilleux' for 'slithy', evokes French words like 'lubrifier' (to lubricate) to give an impression of a meaning similar to that of Carroll's word. In his exploration of the translation challenge, Hofstadter asks "what if a word does exist, but it is very intellectual-sounding and Latinate ('lubricilleux'), rather than earthy and Anglo-Saxon ('slithy')? Perhaps<b> 'huilasse' would be better than</b> 'lubricilleux'? </i> Or does the Latin origin of the word 'lubricilleux' not make itself felt to a speaker of French in the way that it would if it were an English word ('lubricilious', perhaps)?
46+
"Jabberwocky" has been translated into numerous languages,<sup>[31]</sup> as the novel has been <b>translated</b> into 65 languages.[32] The translation might be difficult because <i>the poem holds to English syntax and many of the principal words of the poem are invented. Translators have generally dealt with them by creating equivalent words of their own. Often these are similar in spelling or sound to Carroll's while respecting the morphology of the language they are being translated into. In Frank L. Warrin's French translation, "'Twas brillig" becomes "Il brilgue". In instances like this, both the original and the invented words echo actual words of Carroll's lexicon, but not necessarily ones with similar meanings. Translators have invented words which draw on root words with meanings similar to the English roots used by Carroll. Douglas Hofstadter noted in his essay "Translations of Jabberwocky", the word 'slithy', for example, echoes the English 'slimy', 'slither', 'slippery', 'lithe' and 'sly'. A French translation that uses 'lubricilleux' for 'slithy', evokes French words like 'lubrifier' (to lubricate) to give an impression of a meaning similar to that of Carroll's word. In his exploration of the translation challenge, Hofstadter asks "what if a word does exist, but it is very intellectual-sounding and Latinate ('lubricilleux'), rather than earthy and Anglo-Saxon ('slithy')? Perhaps<b> 'huilasse' would be better than</b> 'lubricilleux'? </i> Or does the Latin origin of the word 'lubricilleux' not make itself felt to a speaker of French in the way that it would if it were an English word ('lubricilious', perhaps)?
47+
</p>

packages/bundle-odoo-website-editor/OdooWebsiteEditor.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ export class OdooWebsiteEditor extends JWEditor {
6565
constructor(options: OdooWebsiteEditorOption) {
6666
super();
6767
class CustomPlugin extends JWPlugin {
68-
commands = options.customCommands;
68+
commands = Object.assign(
69+
{ commit: { handler: options.afterRender } },
70+
options.customCommands,
71+
);
6972
}
7073

7174
this.configure({
@@ -199,7 +202,6 @@ export class OdooWebsiteEditor extends JWEditor {
199202
['editable', ['main']],
200203
],
201204
location: options.location,
202-
afterRender: options.afterRender,
203205
});
204206
this.configure(DomEditable, {
205207
autoFocus: true,
@@ -223,7 +225,7 @@ export class OdooWebsiteEditor extends JWEditor {
223225
}
224226

225227
async render(): Promise<void> {
226-
const domLayout = this.plugins.get(DomLayout);
227-
return domLayout.redraw();
228+
// const domLayout = this.plugins.get(DomLayout);
229+
// return domLayout._redrawAfterCommand();
228230
}
229231
}

packages/core/src/Core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class Core<T extends JWPluginConfig = JWPluginConfig> extends JWPlugin<T>
8585
previousSibling.removeBackward();
8686
} else if (range.startContainer.breakable && range.startContainer.editable) {
8787
// Otherwise set range start at previous valid leaf.
88-
let ancestor = range.start.parent;
88+
let ancestor: VNode = range.start.parent;
8989
while (ancestor?.breakable && ancestor.editable && !ancestor.previousSibling()) {
9090
ancestor = ancestor.parent;
9191
}
@@ -113,7 +113,7 @@ export class Core<T extends JWPluginConfig = JWPluginConfig> extends JWPlugin<T>
113113
nextSibling.removeForward();
114114
} else if (range.endContainer.breakable && range.endContainer.editable) {
115115
// Otherwise set range end at next valid leaf.
116-
let ancestor = range.end.parent;
116+
let ancestor: VNode = range.end.parent;
117117
while (ancestor?.breakable && ancestor.editable && !ancestor.nextSibling()) {
118118
ancestor = ancestor.parent;
119119
}

packages/core/src/Dispatcher.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,13 @@ export class Dispatcher {
105105
await hookCallback(args, signal);
106106
}
107107
}
108+
109+
/**
110+
* Dispatch the commit signal.
111+
*/
112+
async commit(): Promise<void> {
113+
for (const hookCallback of this.commandHooks.commit) {
114+
await hookCallback({}, 'commit');
115+
}
116+
}
108117
}

0 commit comments

Comments
 (0)