A simple HTML editor to work in the edge browser

CJ_London

Super Moderator
Staff member
Local time
Today, 03:18
Joined
Feb 19, 2013
Messages
17,810
It needs further development to meet specific requirements but ChatGPT came up with this as a basic editor. Thought I'd share it in this forum.

To use, unzip and modify the path in the edge browser controlsource to wherever you put the html file
 

Attachments

Thank you for sharing . :)🌹

I believe that you can get the same result by using just access tools ;) :
1769881113418.png
 

Attachments

@Moosak
Bear in mind that isn't full HTML. You are just showing the PlainText version of the RichText data in the right textbox.
I do exactly the same in my rich text editor app

If you try and enter HTML features not supported by RichText format, it will fail.
 
you can also run the html file in a browser if you so wish - can't do that with richtext
 
@CJ_London
The image feature doesn't appear to work correctly either for local or online image paths. I just see a placeholder in each case.
 
As I said, it is a basic editor and needs further development and that is one of the things that needs addressing - I simply asked chatgpt, it produced the code and it worked as is. I did so as a response in a thread asking about the 'dangers' of richtext. If someone want to copy the html code, post it to an AI of their choice and ask for it to add additional features they can. It took me no more that 15 minutes to create and I'm not claiming any credit.

I've played around with it some more since, but not finished - now It displays images and you can resize them, move them around the screen and set text wrapping. More work to be done (for me) - increase the number of fonts, provide background coloring - particularly for tables, provide borders for images, add buttons to name a few. For me, I would primarily use it for creating help files and email html body templates. It's also useful (to me) for seeing how the underlying code is modified - much like your rich text editor For others, perhaps they would want to add the facility to open another form, use a magnifier on some of the text, use vertical text - or even to create their own web pages (although there are plenty of editors out there already).
 
It needs further development to meet specific requirements but ChatGPT came up with this as a basic editor. Thought I'd share it in this forum.

To use, unzip and modify the path in the edge browser controlsource to wherever you put the html file
I found it very useful when editing/creating my HTML driven switchboard from withing access....
 
Actually, I been looking for a nice HTML editor - might consider using ckedit.

From our web based software, we have a email template system.

So, this allows us to create a e-mail template, and even ms-access (with outlook) can (and does) also use these templates.

Since it's a email system, then we allow small images "in-line" and thus we often paste into the editor a image - and it becomes a base64 string.

So, it looks like this:

1769908769669.png


To be fair, the sample posted HTML editor here?
I find that ctrl-v in that editor DOES paste in the image as base64 strings.

Hence this:
1769907962263.png



Needless to say, having a HTML editor to "create" content such as web greetings, or in this case a email template is a REALLY nice approach, since then you can with ease create + format a email - with fonts, pictures, signatures etc.

The above template also allows one to define/use a table or query, and you can pass the routine a PK id for the database row, and thus any data column field can be included in such templates.

As noted, while the above first screen cap is a 100% web based HTML editor, those same templates (saved into a database) are also used by our MS-Access applications.

I can only state that using "markup" to create content for emails etc. has an amazing amount of use cases.....

Now, if I can just find a really great HTML edtior, one without monthly license fees, then I can dump the older editor I'm currently using the ajaxtoolkit HTML editor right now, and it's quite old, but gets the job done).

Newer editors have picture re-sizing options, and quite a bit more support for CSS. However, we avoid CSS right now, since outlook desktop not been much tested to see how/what it supports and does with CSS...

R
Albert
 

Attachments

  • 1769907757665.png
    1769907757665.png
    309.6 KB · Views: 39
Last edited:
Wow - looks like you’ve moved it a long way forward - will take a look when I’m back at my pc
 
Moved on with this a little more; added some things in needed...

Thanks for sharing. I will consider using this on one of my web sites. Not quite sure how I'll add sanitization, but the pages using this HTML editor are ONLY used by site admins to create messages and some content - not end users.

Sanitization is often required if such pages that "allow" HTML editing are public facing, since one does not want users to say inject JavaScript into the content. However, lack of sanitization could be a "feature" in the sense that when/if ONLY site admins are using the HTML editor for adding content to the site, then one tends not to care about "dangerous" content being used or added via such an HTML editor.

I don't require sanitization at this point in time.....

Busy and not a top priority right now but I will give this editor a try on one of my sites - just to see how well it works compared to the existing HTML editor I'm using. For images, I currently use "in-line" images which of course become base64 strings, and is a feature I use quite a bit right now.

So, I'll try this time permitting -- and post back to see how well this suits my needs....

Again, such editors have a zillion use cases, and often the use cases are VERY surprising. I have a "issues" database, and the choices are managed by a HTML editor, and thus to add a new software system, we can paste in a new choice, but the choice can include HTML.

So, choices look like this right now:

1771017419018.png



In above, the "Project" choices from a database, but the "choices" are in fact edited with a HTML editor. So, in place of a simple combo box dropdown, we have nice grapic image choices. But, it still the equiliavnt of a combo box. In fact, I just feed the .net radiobutton list with the list of choices, but as above shows, the Project, the Isssue, the Priority? They are all HTML choices, so above looks MUCH nicer then just 3 combo boxes, but code behind really is the SAME as if we just used combo boxes for the choices.

So, the point? Well, then the choices on the site become rather nice looking, since we not limited to a simple combo box for such choices, but can include image + text. The editor thus looks like this:

1771016970962.png


So, for a "choice" of project type, I can have text, graphics, or both. It means as a developer, I allow the admin to add new project types, but they are a whole lot nicer then just a combo box with text.

I should also point out that often when editing a issue, they include a screen shot - again, a HTML editor allows this. In above, that screen shot is of a ms-access application.......
Needless to say, this means that HTML editors have boatloads of use cases......

R
Albert
 

Attachments

  • 1771016614295.png
    1771016614295.png
    397 KB · Views: 24
  • 1771016921058.png
    1771016921058.png
    23.9 KB · Views: 22
Last edited:
Yes, but why are you doing it?

What benefit to you is obfuscating this code, especially as it's likely mainly based off publicly available code scraped by an ai?
 
Yes, but why are you doing it?

What benefit to you is obfuscating this code, especially as it's likely mainly based off publicly available code scraped by an ai?
Specially why obfuscating something and putting it in Code Repository sub forum, a place that's used for sharing codes and learning how something is done, not hiding the techniques.
 
I’m nearly finished now — just adding the top‑level File menu above the toolbars with the usual New, Open, Save, Save As, Close, and so on. I’m also duplicating some of the existing toolbars like Format, Insert, Token, plus a few specialist functions. Everything’s running smoothly.

This looks impressive and potentially very useful if it can be almost a drop-in replacement for a multiline textbox. I am interested in seeing the related html file for this latest version that you show in the YouTube video. I also would be hesitant to use anything in a production application that attempts to encrypt or minify the JS source code -- too many security concerns not knowing what might be happening behind the scenes. I'm curious also if all of the images for the toolbar icons (which look very professional) are also embedded in the html (as base64) so that it does not have any external image dependencies.
 

Users who are viewing this thread

Back
Top Bottom