Discourse Basic Editor - Beginner friendly composer!

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.

7 Likes

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

1 Like

yeah I have been using it for testing other plugins lately. You can just watch the video I made if you are in a rush or install it locally and play with the code. I didnt open source the tiptap version I started working on. I also worked on fixing the draft system. I think the rules about how many drafts one can have and where just feel arbitrary. So users can have as much new topic drafts as they want.
But as I said, I probably wont finish it unless I am really really bored haha
If there is no financial incentive I just wont care enough.

I also thought about this. I was working on a discourse-monero integration so that I can sell early access to git repos (also looked into integrating discourse and something like gitea or gitlab). But I am not sure if there is really a “crowd” to put the crowd into the “crowdfunding”. It seems like the only people paying for discourse have a business relationship with the company behind discourse.

Tiptap isn’t really a comparable example though because it’s just using markdown shortcuts to convert to HTML (AFAIK). You can’t then edit formatting that already exists using markdown (because the syntax does not display). So you can go one direction but not the other. And to me any WYSIWYG editor solution for Discourse that doesn’t render to markdown in the output is a non-starter. That fundamentally breaks core compatibility and locks you in to the particular editor plugin you’ve chosen. I guess if Tiptap could output to markdown the approach would be fine.

The point of showing Typora as an example is that they fairly elegantly harmonize WYSIWYG with markdown. It seems that for some, like @Jagster , an ability to keep the existing behavior and not “jump” between preview and syntax would be desirable. But I do think the Typora approach is preferable and more intuitive for many other people.

That’s exciting to hear! I would definitely be interested in this.

Agreed! I think/hope this will be improved in core in the future.

While I don’t think you’re quite right that the “only” people paying for Discourse have a business relationship with CDCK (Communiteq would probably have things to say about that :grinning_face_with_smiling_eyes:), I do agree that for an open source project Discourse has a community somewhat lacking in “community spirit” or “openness” or something. I can’t quite put my finger on it, but things definitely work differently here than in many other open source projects, even ones run by commercial entities. I am hopeful that true crowdfunding efforts and community-own/driven plugin (or even changes to core) can happen one day. I would especially like to see this around theme development for more advanced layouts and changes, as I’ve mentioned before: Relative lack of themes - am I missing something?

4 Likes