XWiki Platform
  1. XWiki Platform
  2. XWIKI-4048

Automatically add empty new line before/after macros when inserting standalone macros

    Details

    • Tests:
      Integration
    • Development Priority:
      High
    • Difficulty:
      Medium
    • Similar issues:
      XWIKI-4884Hide the first and last new line when editing a standalone macro
      XWIKI-3551Cannot insert standalone macros
      XWIKI-5050A macro followed by a single new line is standalone
      XWIKI-3562Standalone macros should take 100% of the available space in the GWT WYSIWYG
      XWIKI-5013HTML code visible when inserting velocity macro displaying a property
      XWIKI-3297Add ability to insert macros
      XWIKI-3233Add ability to edit inserted macros
      XWIKI-259Add a macro button in the WYSIWYG allowing to insert from a configurable list of macros
      XWIKI-3762Macro insertion issue in IE6 -> next paragraph style is lost
      XWIKI-4856Charset errors on macro insertion

      Description

      Happens when using the wysiwyg to insert a ToC macro.
      If i do not leave a line above the macro, user gets this message :
      "not an inline macro" which is not helpful.
      That warning message will be displayed once the page is saved.

      Not working :

      **Content Table**
      {{toc/}}
      
      == Section A ==
      

      Working :

      **Content Table**
      
      {{toc/}}
      
      == Section A ==
      

        Issue Links

          Activity

          Hide
          Marius Dumitru Florea added a comment -

          I'll make sure the ToC macro is inserted in the right place when using the WYSIWYG. Wiki syntax users will have to take care of this themselves though so we should make the message more clear anyway.

          Show
          Marius Dumitru Florea added a comment - I'll make sure the ToC macro is inserted in the right place when using the WYSIWYG. Wiki syntax users will have to take care of this themselves though so we should make the message more clear anyway.
          Hide
          Thibaut Camberlin added a comment -

          Can we also deal with wiki mode?

          Show
          Thibaut Camberlin added a comment - Can we also deal with wiki mode?
          Hide
          Sergiu Dumitriu added a comment -

          Can we also deal with wiki mode?

          What do you mean? There's no button for adding a table of contents.

          Some of the buttons from the wiki editor toolbar do leave a blank line where needed and safe. For example headings, the HTML and the Velocity macros do leave an empty line around them.

          Show
          Sergiu Dumitriu added a comment - Can we also deal with wiki mode? What do you mean? There's no button for adding a table of contents. Some of the buttons from the wiki editor toolbar do leave a blank line where needed and safe. For example headings, the HTML and the Velocity macros do leave an empty line around them.
          Hide
          Marius Dumitru Florea added a comment -

          I've fixed the problem by splitting the insertion point when a stand-alone macro is inserted in-line. Note that this behavior is similar to what happens when a table is inserted in-line.

          Show
          Marius Dumitru Florea added a comment - I've fixed the problem by splitting the insertion point when a stand-alone macro is inserted in-line. Note that this behavior is similar to what happens when a table is inserted in-line.

            People

            • Assignee:
              Marius Dumitru Florea
              Reporter:
              Stéphane Barbey
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: