editor-js / paragraph

Paragraph Tool for Editor.js 2.0
MIT License
46 stars 127 forks source link

Paragraph text alignment (Feature Request) #22

Open gopumon opened 5 years ago

gopumon commented 5 years ago

It would be nice to have an option to choose text alignment (left, center or right) for the paragraph.

tsalira commented 4 years ago

Very much so! I have struggled one full week trying to figure this out. Any ideas??

neSpecc commented 4 years ago

We will include this feature to the plan of next updates

tsalira commented 4 years ago

Thank you! Looking forward to it.

Is there any hack I can use for now in the meantime?

jgui1129 commented 4 years ago

Hi, you can try the hack i did. Take a look. It will add classes (text-right, text-left or text-center)

Screen Shot 2020-06-25 at 12 12 50 AM

`/**

/**

/**

/**

export default Paragraph

`

Screen Shot 2020-06-25 at 12 11 25 AM

You also need to add this simple css to work with the svg .svg-icon { width: 1em; height: 1em; }

.svg-icon path, .svg-icon polygon, .svg-icon rect { fill: #4691f6; }

.svg-icon circle { stroke: #4691f6; stroke-width: 1; }

kaaaaaaaaaaai commented 4 years ago

Has anyone seen it yet?

semoal commented 4 years ago

Could be a better solution a plugin called @editor-js/alignment, that checks if the block that has been created can be aligned, if so, just align it?

It could work for: images, headings, paragraphs, tables...

Probably i'll work on it

semoal commented 4 years ago

i made it once https://github.com/kaaaaaaaaaaai/paragraph-with-alignment

https://github.com/codex-team/editor.js/pull/1272 Implemented it on core editor, we're discussing what could be the best solution

atiabjobayer commented 4 years ago

@semoal how can I use it? as you said it's been implemented already. Kinda noob :')

yassh commented 4 years ago

I wish #35 would be merged.

muster-mark commented 3 years ago

@neSpecc Is this feature still included in the next updates?

VityaSchel commented 3 years ago

is editorjs still maintened? I see pull request in table repository with feature to delete cells from December and there is a pull request from September that adds alignment. If these are not stable, why don't merge it on not-stable branch then?

helmiItsavirus commented 3 years ago

@kaaaaaaaaaaai please add some function such as line height and font size.

I spent 2 days making it. LOL

don't forget to add line-height and font-size dropdown in settings.