Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visual feedback in the editor #5

Open
stdoma opened this issue Mar 7, 2024 · 4 comments
Open

visual feedback in the editor #5

stdoma opened this issue Mar 7, 2024 · 4 comments

Comments

@stdoma
Copy link

stdoma commented Mar 7, 2024

Hello!
Thanks for the plugin. This kind of thing has been around for a while in the Atto editor. I was basically waiting for this for the Tiny.

I tested the plugin (Moodle 4.1.9 (Build: 20240212) / Plugin 1.3 (2024022600)).
Unfortunately, there is no visual feedback in the editor itself when you have inserted a template.
When you work with DIV containers you can't see that there is any formatting.
You can't see where you should write directly so that the content is contained in the wrapper.

defined elements
Screenshot 2024-03-07 111413

after insert visual
Screenshot 2024-03-07 111547

after inser code
Screenshot 2024-03-07 111623

@srobotta
Copy link
Owner

srobotta commented Mar 9, 2024

Hi,

Thank you for your report. Actually when you insert one of these blocks you should see this blue or red block like you see it in the dialogue window. As far as I can tell from here, nothing gets inserted into your edited field.
To reproduce this, could you please show the exact html that is defined in the settings?
Thank you.

@stdoma
Copy link
Author

stdoma commented Mar 11, 2024

Hello!

I saved the style definitions in the theme's RawSCSS. I am attaching the definitions as a file.
RawSCSS.txt
In the plugin I used the definitions as a class element in a div.
Screenshot-2024-03-11-115404

I have two other points:

  1. I had uninstalled the plugin. After reinstalling today the settings were still there. Are the settings saved persistently?
  2. When I select a text and insert a style, the selected text is replaced. It would be nice if the style was wrapped around the selected text.

@srobotta
Copy link
Owner

Thank you for your feedback.

First about the style not beeing displayed when using the editor: in your example you are using classes that are inserted via a custom scss in the theme. Apparently this scss/css is not included in the editor itself. With a preview plugin or when saving the page, the content is displayed correctly. Of course, this is not exactly "what you see is what you get". I am not sure if this is fixable within the plugin itself. It should be fixed in Moodle in general. I also noted in the readme to use inline styling when defining the html elements to avoid such issues.

  1. There is no uninstall hook at the moment where the settings are removed. Because of the amout of data, the coniguration might be saved as a file on the file system.
  2. This would be an improvement. At the moment, there is no chance to mark placeholders that might be replaced with certain content. In other cases you may have selected some elements (e.g. the blue box) and want to replace it with some other element (e.g. the red box).

I will keep the issue open until I have an answer to the original problem about the missing css classes and how a feature of 2. may look like.

Thank you.

@srobotta
Copy link
Owner

https://tracker.moodle.org/browse/MDL-79120 is dealing with the issue that is mentioned here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants