Files
odoo_source/addons/knowledge/static/tests/test_services.js
T
3cd87ca0dc [IMP] knowledge: add the template and file commands
This commit adds some commands that can be used in the html editor.

Editor Commands
---------------

Some new editor commands have been added:

- */article:*
This command is available on every html field using the Odoo Editor.
This command allows to add a direct link to the selected knowledge article.

- */file:*
This command is only available in the Knowledge App.
This command allows to add a file (or an image) download button inside the
body. The user can choose a file to add from its own file directory or an
existing attachment already present in the database.

- */template:*
This command is only available in the Knowledge App.
This command allows the user to create a block where them can write and lay out
content destined to be reused by the readers of the article. The lasts will be
able to copy and paste it to send it as message or use it as a description on
other records.
No /command can be added inside a template.

Technical notes:
/file and /template commands can be activated in other modules by adding
knowledge_commands = True on the html field in the view where they should
be activated.

Task-2674460

Part-of: odoo/odoo#82315
Co-authored-by: Damien Abeloos <abd@odoo.com>
Co-authored-by: Julien Banken <jbn@odoo.com>
Co-authored-by: David Beguin <dbe@odoo.com>
Co-authored-by: Fabio Barbero <faba@odoo.com>
Co-authored-by: Thibault Delavallee <tde@odoo.com>
Co-authored-by: Aurelien Warnong <awa@odoo.com>
2022-05-13 02:58:51 +02:00

16 lines
467 B
JavaScript

/** @odoo-module */
import { testEnvServices } from '@web/../tests/legacy/helpers/test_services';
Object.assign(testEnvServices, {
knowledgeService: {
pushToValidateWithHtmlField: () => {},
popToValidateWithHtmlField: () => {},
registerRecord: () => {},
unregisterRecord: () => {},
getAvailableRecordWithChatter: () => {},
getAvailableRecordWithHtmlField: () => {},
getRecords: () => new Set(),
}
});