Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add md / WYSIWYG area? #158

Closed
Ezra-Siton-UIX opened this issue Oct 24, 2017 · 14 comments
Closed

How to add md / WYSIWYG area? #158

Ezra-Siton-UIX opened this issue Oct 24, 2017 · 14 comments

Comments

@Ezra-Siton-UIX
Copy link

Ezra-Siton-UIX commented Oct 24, 2017

I find this topic (still open). For now - thier is option to add MD to
Enduro? (Dont find any docs about this issue beside this post).
#71
Gottwik/enduro_samples#2

Why? for now its really hard to create text-areas without any structure (rich-text). Also MD vs clients - how clients/site-managers will write MD? (For now i build my own site - but in the future it could be a problem)

Idea like this:
https://quilljs.com/

ANYWAY - why this feature (MD for now) - not build in - in the core as option (data-type)? (usefull in 99% of the sites)

@Ezra-Siton-UIX Ezra-Siton-UIX changed the title How to add md / WYSIWYG area How to add md / WYSIWYG area? Oct 24, 2017
@Gottwik
Copy link
Owner

Gottwik commented Oct 24, 2017

Hey Ezra, I totally get the point. The idea is to build a plugin system because enduro is gaining weight. This way, plugging in wysiwyg would be as simple as enduro install wysiwyg.

What do you think about this approach?

@Ezra-Siton-UIX
Copy link
Author

Ezra-Siton-UIX commented Oct 25, 2017

This will be great (I think most of the users will install this plugin - so maybe in the future it will be in the core)

Again - i work with WP, Concrete5, webflow and wix. Although thier endless options - Most of the work of clients is on rich-text-editor "block" (write blog-post / guide / and so on) - so i think this is very important part for any site.

Example:
https://documentation.concrete5.org/editors/in-page-editing/block-areas/add-block/content

This is also will give enduro full RTL support (beacuse in good wysiwyg you have rtl-dir button)

@rnlambert7
Copy link
Contributor

I agree that WYSIWYG functionality should be supported. However people like their different Editor plugins, so I think having sticking with the enduro install wysiwyg approach could be best. Then its optional. Maybe add a section in the docs about what installing the default one does and what it uses (like the current example pell which I'm now using at your recommendation @Gottwik ) and then some information about how to install your own.

Either that or it is in the core, but the same docs on how to install a new one and disable the original. Options are good either way.

@Gottwik
Copy link
Owner

Gottwik commented Nov 5, 2017

image

So, I just pushed this, would be awesome if you could try and confirm this works for you.

install quill by enduro install enduro_quill. Then you can just use it as admin control type:

{
	$test_type: 'quill',
	test: '',
}

@Ezra-Siton-UIX
Copy link
Author

Ezra-Siton-UIX commented Nov 5, 2017

Hi. First, if someone read this later - you should first update enduro (npm update -g enduro) than enduro install enduro_quill

Gottwik thanks - looks great. From CMS side it works fine. But from page view it prints HTML as text:

{
	$test_type: 'quill',
	test: '<h1>hello</h1>',
}

{{test}} Output in the html as plain text :
<h1>hello</h1>

Admin UI:: Height of the text-area should be like $description_type: 'textarea',"

@CosmoMyzrailGorynych
Copy link
Contributor

CosmoMyzrailGorynych commented Nov 5, 2017

@Ezra-Siton-UIX you should use {{{test}}} in your templates to output HTML. {{these_double_brackets}} return escaped HTML only.

useful docs on Handlebars

@Ezra-Siton-UIX
Copy link
Author

Ezra-Siton-UIX commented Nov 5, 2017

Thanks. Works great now. Do you know how can i add options to the toolbar? (Align-right/left) and idea like this (OR Add images to block post). I dont find any setting under enduro (node_modules)
https://quilljs.com/docs/modules/toolbar/

Example:
http://quilljs.com/standalone/full/

@Gottwik
Copy link
Owner

Gottwik commented Nov 14, 2017

@Ezra-Siton-UIX right 😄, that's phase two, hold tight, I'll get it done.

@YuraKolesnikov
Copy link

Hi guys! I have a question for you. How do I remove this grey frame around quill toolbar and make it look normal?
screen shot 2018-01-03 at 16 22 00

@rnlambert7
Copy link
Contributor

Hi @YuraKolesnikov. I've seen the issue with the frame around the editor a few times in later issues. Here's a quick solve if you need it: #198

Also, any other enduro_quill related issues can created here: https://github.com/Gottwik/enduro_quill/issues

@rnlambert7
Copy link
Contributor

@Ezra-Siton-UIX Safe to say the issue can be closed since Gottwik implemented this and brick processors now solve allow custom fields?

@Ezra-Siton-UIX
Copy link
Author

@rnlambert7 the case is close beside: Add some docs about this (great feature --> more users) + RTL support (For now for me - I don't have a way to give clients to write in Hebrew for now).

@rnlambert7
Copy link
Contributor

In that case, check out https://www.npmjs.com/package/enduro_pell.

I made that last week as I began with Pell in my project, and the client preferred that so I made a brick to support it. It's almost completely a copy of enduro_quill.

Right now I set it up only with basic features that we are using on our project and then when the project is over, I was going to add better support for it for others use. However you are free to take a look and either write your own, or send a PR. It's very basic right now, but it'd be good to give it the ability to choose certain layouts in the future. (Because of this, I haven't really shared it publicly)

However if you have a better Wysiwyg that supports your needs, I would say duplicate this or quill and create your own.

@Ezra-Siton-UIX
Copy link
Author

Ezra-Siton-UIX commented Jan 15, 2018

OK. I close this topic - but again in "summary" this is one of the most important/daily use in any CMS. I hope Enduro like WP and Concrete5 and others CMSs give the user Wysiwyg text editor (With RTL direction and other basice features).

Again no way to create "real project" for clients without this :) Thanks. And wait for updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants