Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25886

Implement a WYSIWYG editor service to re-render the edited content

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Major
    • 18.10.0
    • 18.10.0
    • WYSIWYG Editor
    • None
    • Unit, Integration
    • Unknown

    Description

      WYSIWYG editors whose content syntax is not HTML (e.g. BlockNote) need to show the output of the macro calls that are inserted or modified while editing, by the current user or by the other users editing the same content in realtime. This requires a server-side service that takes the edited content, in the syntax of the editor, executes its macro calls and returns the result in the same syntax.

      All the macro calls have to be executed, not only those that changed, because the output of a macro call can depend on the rest of the content (e.g. the table of contents, or the variables set by a script macro and used by another).

      Executing macros on content received in a request is a sensitive operation, so the service must:

      • accept only POST requests with a valid CSRF form token
      • execute the content with the rights of the request effective author, i.e. the current user, or, when the content is edited in a realtime collaboration session, the session participant with the least script rights among those that changed the content
      • support executing the content in a restricted context (e.g. when editing a comment)
      • execute the content in the context of the document where it is saved, like when it is viewed

      The service is generic: the request specifies the editor syntax (e.g. blocknote/1.0) and the syntax used to save the content (e.g. xwiki/2.1), so that it can be reused by any WYSIWYG editor implementation.

      It is needed by XWIKI-24244.

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: