Discourse Basic Editor

I can see where you want to go. If I understand correctly you want to create a kind of full Editor with much more advanced functionality using html to give a much more complete experience.

I for one would love to see a WYSIWYG editor that preserves the markdown output. I am less concerned about being able to type in and have it interpret markdown; normal shortcuts like e.g. Ctrl-B (bold) are fine, or the toolbar. But I do want to preserve later editability, interpretation outside of a rendering context, and exportability. And HTML in my experience is problematic for at least some of it not all of that.

I am curious what specifically you are wanting the editor to do that is not compatible with markdown output?

Also Iā€™ll point out that Typora does a pretty good job of handling rendering of markdown in-line as well as shortcuts, and I donā€™t see why a formatting bar couldnā€™t also work (though it doesnā€™t seem to have one).

5 Likes

How do I move the photo add button.

move

3 Likes

Hey @ozkn!

Iā€™m working in a way which just imageUpload will be necessary! So, you could follow the same lead. In your initializer you could modifyClass of component:b-editor changing setubBasicEditor function.

api.modifyClass("component:b-editor", {
   setupBasicEditor(){
       loadScript("/plugins/DiscourseBasicEditor/ckeditor.js").then(() => {
           ClassicEditor.create( document.querySelector( '#editor' ), {
                toolbar: [xxx],
                ...
           })
   }
});

Checkout this Configuration - CKEditor 5 Documentation for toolbar reference, in my case Iā€™m justing using toolbar: [ā€œimageUploadā€]

Best regards

3 Likes

Hey guys! Maybe I could use a little help from you!

Iā€™m working in a project which I use more than one composer, like this (in the beginning of the initial page, for users create topics by there, just like a main composer facebook-like).

Screen Shot 2021-01-15 at 12.27.20

According to this, I have been getting some issues when opening composer (maybe 'cause Iā€™m already using in main page).

So, when I want to update a topic, I use composer controller to open model, but getting b-editor message.

Have you guys getting same problem in working with multiple composers ?

Best Regards,
Felipe

3 Likes

maybe you can deactivate the plugin for now. As I said, this is still work in progress. I will probably work more on it next month. I focus on learning mandarin at the moment lol. If you want you can link me to your github or send me your code so I can try and understand what you are trying to do.

5 Likes

Reporting a bug, it seems after activating the plugin, the management section was covered.

  • Test version: Discourse 2.7.4 stable
  • Test browser: chrome, firefox on both computer and mobile phone

Selection_750
Selection_751

5 Likes

Hello, will it support 3-rd party additional plugins-functions for standard editor likeā€¦ ?

It will support ckeditor addons instead.

This is an ui simplification experiment of mine that will probably be put into a separate plugin. Feature creep is bad haha

I want to say something: without a source of monetization it does not make sense for me to write this code. I also tried to do closed source plugins:

But the the issue is that code gets shared among buyers, which means there would be a need for a constant stream of new clients that dont come through word of mouth which is hardly sustainable.

So I would be interested if you would be willing to pay for this and if you have any suggestions on how we can solve the code sharing among buyers problem.
If yes please tell me how much in the comments below. :smiley:

Would you be willing to pay for this?
  • yes
  • no
0 voters

thaaanks

1 Like

Does this your new WYSIWYG editor change the posts structure over standard Discourse? By another words if your editor will be disabled - does posts created with your editor will have any issues with editing by the standard editor?

Do you have a monetization plan how to raise a sum of money?

at the moment the editor generates markdown so we can use both editors next to each other without any issue. But the experience is not perfect and it always will be if we stick to markdown. Thats why the final solution will produce html. If this is a deal breaker for someone because they dont want to be locked in, there is an easy fix for this: just convert the html back to markdown.

I think there is no need to raise money up front. If I know there is a bunch of people that would be willing to pay for it and how much I will just finish the code. You can also reach out to me in private if you feel uncomfortable sharing budget related discussions in public.

4 Likes

Have you try to discuss this nuance with Discourse Team? Maybe they also want to add some new WYSIWYG editor?

they opted against it on philosophical grounds. You can search the forum if you are interested in the details. Their arguments are totally valid and I respect them. Thats why I am working on this.

7 Likes

Following-up on the approach of ā€œjust in time rendering of markdownā€, this seems to be an increasingly popular approach. Roam Research and Obsidian (in latest update adding WYSIWYG) both do this, and the aforementioned Typora. You can see some examples of this in practice on the Typora site:

This kind of ā€œWYSIWYGā€ with the existing toolbar seems like the best of all worlds to me. Most people really donā€™t need formatting beyond what markdown provides. What they need is a more intuitive way to generate and edit markdown.

8 Likes

Great point. I think tiptap.dev has the best approach so far: they have keyboard shortcuts that makes it like you are editing markdown, but it is actually a proper WYSIWG editor. I started to rewrite the plugin with tiptap instead of ckeditor. But I havent published it, because I couldnā€™t find funding for this (I dont get paid by discourse).
And I dont care enough to work on this in my free time.
Kind Regards,
Spirobel

4 Likes

Everytime a user must use (and remember) shortcuts and commands WYSIWYG doesnā€™t matter. Most of people donā€™t use nor understand markdown or HTML. Those who knows need WYSIWYG rarely and mostly in scenarios where one isnā€™t totally sure how output is formatted., like tables.

Quite many here is living in really tight bubble. There is reason why WordPress is popular and Ghost is living in marginals.

It is just me but I hated Typora. All that jumping gives me headache.

And yes, I know Discourse will (almost) never get real WYSIWYG, even most of users would love it.

It could most certainly be done. I am maybe 80% there. The thing is: I donā€™t care enough to finish it. Discourse is more like a company product and not like an open source project. People here are mostly company employees or want to use discourse for their own projects. So the energy just isnā€™t there. Maybe one day I am really bored I will finish it just to prove a point. :grinning:
Anyway have a nice day,
Spirobel :grinning_face_with_smiling_eyes:

8 Likes

Yeah for community members to put such a big effort into such projects there needs to be a better effort by the community to sponsor such projects.

Crowd funding within Meta is a bit of a tricky area, however. Pavilion is looking at ways to make this more straightforward.

8 Likes

Is this site still available for testing this plugin? Looks like it still uses the built-in editor

1 Like