[IMPLEMENTED] Styled source code view


#1

I work quite a lot in the source code view since I use Bootstrap classes a lot so it would be nice to have a more colorful soruce code editor. Basically some coloring and a good default document formatting with indendation would be enough for this feature to begin with.


#2

Oh, and one more thing. The width and height of the modal could be stretched out some more. There is plenty of room, specially on the sides.


#3

What do you think about codemirror: https://codemirror.net/index.html?

Increasing the size should be no problem. I just have to maintain a third size of the modal like small, normal, large. At the moment we have only two sizes.


#4

Codemirror looks good. :+1:


#5

I am not sure if I really understand your requirements, what is the problem with the current editor? If we increase the size, we should probably also add some snippets to the dialog.


#6

The is currently no indentation, no colors and the modal is too small to be able to work effectively.


#7

No indentation?


#8

I am referring to the source code view from within the rich text editor, not the editor for the scripts.


#9

Ah, know I see :smiley: … you can write a custom editor if you want.

Basically you just want a html editor without previewing, right? My experience is that it works pretty bad to write the html by yourself and to have the rich text functionality.


#10

Yes, preview is not needed.
I don’t write much HTML. I just wrap elements in spans or divs and add some flex / bootstrap classes most of the time. 95% I do by using the RTE UI.


#11

Hi, I have added the editor for you:


#12

I think we misunderstood each other again :yum:
The editor I’m talking about is the one that opens up in a modal when you select “view source” in the “File”-menu - under the menu item furthers to the right - don’t remember its name but can post a screenshot later.


#13

Damn :smiley: … But it is out of scope to write a custom WYSIWYG editor. You could try another one editor like ckeditor 5. If I remember the license was a problem, but you can write your custom editor based on the sample


#14

Thanks for the tip but I think it’s fine for now.


#15