Skip to content

CSS highlighting is lost in Visual Editor #12539

Open

Description

@GegznaV

System details

RStudio Edition : Desktop [Open Source]
RStudio Version : 2022.12.0.354
OS Version      : Windows 10 x64 (build 19045)
R Version       : R version 4.2.2 (2022-10-31 ucrt)

Steps to reproduce the problem

  1. Use this code in .qmd (and .Rmd) file:
```{css, echo=FALSE}
pre.sourceCode .r {
  border-left: 5px solid #7b97ea;
  border-radius: 0
}
pre.sourceCode .python {
  border-left: 5px solid #CFB53B;
  border-radius: 0
}
```
  1. Switch between visual and regular modes

Describe the problem in detail

In visual mode, CSS syntax highlighting is lost:
image

While in regular mode it was OK:
image

Describe the behavior you expected

Use CSS syntax highlighting in both modes.

Activity

  1. added
    new
    on Jan 7, 2023
  2. added
    visual markdown
    and removed
    new
    on Apr 11, 2023
  3. sharon-wang commented on Apr 11, 2023

    @sharon-wang
    Member

    Thanks for reporting this issue!

    I'm able to reproduce this in 2023.03.0 Build 386 on MacOS 13.1.

    It looks like CSS highlighting was introduced in the source editor via this PR. I'm not sure if the visual editor consumes the source editor syntax highlighting, but I also haven't found equivalent changes that would enable CSS syntax highlighting in visual mode.

    We'll keep this in mind as we work on Visual Markdown fixes!

  4. github-actions commented on Oct 9, 2023

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.

  5. added
    stale
    on Oct 9, 2023
  6. GegznaV commented on Oct 9, 2023

    @GegznaV
    Author

    Is it solved?

  7. removed
    stale
    on Oct 12, 2023
  8. sharon-wang commented on Oct 12, 2023

    @sharon-wang
    Member

    This has not been addressed yet. Tested in 2023.09.0+463 "Desert Sunflower" and the syntax highlighting for CSS is not present in Visual mode.

    This issue is being tracked amongst other Visual Editor issues here: #12794

  9. github-actions commented on Apr 10, 2024

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.

  10. added
    stale
    on Apr 10, 2024
  11. github-actions commented on Apr 24, 2024

    @github-actions

    This issue has been automatically closed due to inactivity.

  12. removed
    stale
    on May 1, 2024
  13. reopened this on May 1, 2024
  14. added this to the Later milestone on May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugvisual markdown

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions