Discourse Basic Editor - Beginner friendly composer!

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).

3 Likes

How do I move the photo add button.

move

2 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

2 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

2 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.

4 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

1 Like