يضيف مكون هذا القالب خيارات تنسيق قليلة في المحرر: التسطير، المحاذاة لليسار، المحاذاة لليمين، المحاذاة الممتدة، والتشريط المتقطع. يمكنك تخصيص نص كل زر في الإعدادات، مما يجعله متوافقًا مع جميع اللغات. يتوفر أيضًا إصدار يدعم الاتجاه من اليمين إلى اليسار (حيث تتغير المحاذاة لليمين إلى محاذاة لليسار).
يعتبر مكون هذا القالب بديلاً لـ شريط تنسيق Discourse، ولا أنصح باستخدامهما معًا.
أنصح باستخدام الإضافة، ولكن إذا لم ترغب في (أو لم تستطع) تثبيت إضافة، فقد يضيف هذا المكون خيارات كافية في المحرر لتلبية احتياجاتك.
أيضًا، لتكييف المكون مع الأجهزة المحمولة، قمت بإخفاء بعض الأزرار: القائمة النقطية، القائمة، والمحاذاة الممتدة. فقد بدت هذه الأزرار الأقل فائدة على هذه الأجهزة.
I upgraded the component to add those extra lines by default, now, when you use a align button and the underline button, you’ll have something like this
The plugin is easier to customize, we can choose which buttons will appear or not, and there are some additional options like color or a float button that can do something like this with the image
Nicely done
Do you think it’s possible to somehow to convert the HTML tags to some default tag like [Center] and something in the backend will convert it back (for UI reasons)?
I added further pull requests for float left, with a CSS option for float right, moving the strikethrough button to be with the bold, italics, and underline buttons, and created a basic columns button. The last may be better as its own component or pushed to the pop up menu.
I removed the pull request; it needs further modifications. I am also looking to add superscript and subscript buttons, but once you add in calendar events, slick, and tiles, there are too many buttons on the composer in mobile’s vertical composer. It shouldn’t be a problem in horizontal, but if all buttons should be accessible from either menu, then they should be moved into the pop up.
Any thoughts, @Steven, on how you want to handle this?
I will just split the main js into two files and work on some responsive CSS.
Ideally we should also add settings to disable/hide the buttons as desired.
EDIT: I’ve implemented the changes mentioned (but elements do not have an option to be hid outside of CSS) and just need to test the changes before submitting a PR.