-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Heading support #532
Heading support #532
Conversation
…list code to reduce code duplication.
…ibe the trick in contentcollector
Will play w/ this now while I have 5mins.. |
Cool ! Just forgot to say that I have a running demo here: http://notes.jtlebi.fr:8080/p/test |
This should really be a plugin (Sorry I know that's a pain) The lines go out of vertical sync as you change font size -> see: http://twitpic.com/8r39gu It might make more sense to provide a (h1), (h2) button and leave it at that? OR A+ a- style buttons for "make font bigger/smaller"? The box around the current drop down has some weird styling attributes (changing to (c) would fix this) Selecting a whole line applies the attribute to the next line, replicate by clicking 3 times on a line of text then changing the title type. This pull request shouldn't really be called "title support", it should be called "heading support".. Title support is something completely different. Lots for you to get on with there but great work so far, I'm sure with my feedback you will get this finished and frequently adopted. It's worth saying early on that I'm notoriously difficult to please when it comes to adding new functionality to the front end so apologies if you got a lot of unexpected bug reports. |
I definitively agree that it should be a plugin. Sadly the plugin infrastructure is not yet available and it will require quite a lot of time for me to learn it. My idea was to do some code cleanups (DRY) in the formating code once merged. I like to work step by steps instead of committing bulks of 10,000 lines at once ! I wanted to add support for text styling as GDoc does and I started with headings. This is why I choosed to do a dropdown instead of multiples buttons. Maybe later someone will add pre-formated text support in the same place. What do you mean by vertical sync ? Yes the lines gets bigger when the font is bigger. No idea how to do it another way :) This is heading support, not font size trick. I wanted it to be semantical. As a use case, I take notes during my lectures using Etherpad-lite. Instead of created pads lectureA-1, lectureA-2, ...,I added titles to distinguish the different sections of the lecture. Someday, I wish I could add folding along with it to focus on the part I type while keeping an eye on the outline. This could not be easily achieved by doing a trivial A+, A- button. Anyway, Etherpad is not a WYSIWYG word-processor. It sounds like a nonsense to add font size tricks. I can not reproduce the bug you describe in text selection + heading application. Since this is handled by the same code as lists, you should have it with ordered and unordered lists too. I'm using Firefox on Linux. I think it should be filled as a separated bug bug report don't you ? Sorry for the title/heading mismatch. English is not my native language. In French "headings" are "Titres" which is close from "title"... I will try to rework the dropdown ASAP. Do you know any mean of getting notified when the text selection changes and to read it's attributes ? It would allow to keep the selected item in the dropdown in sync with the active text and thus to enhance the user experience a lot. What is your opinion about it ? |
…he header DOM generation that caused breakage in the authorship highlighting code
Hi ! @johnyma22 I have to admit that I was a bit frustrated by your answer but I had a very good time getting live feedback from @0ip yesterday directly on the pad. It's really amazing to contribute for a real-time collaborative text-editor this way :) We worked on small bug fixes and big CSS improvments for the toolbar. I'm pretty sure you will like it as they look much, much more professional and user friendly ! To make it short :
In my opinion this is now ready. Any feedback ? cheers, |
Some feedback/bugs:
Sorry about reporting these bugs, I'm pretty good at knowing what to test for.. Apologies if my feedback was less fruitful than 0ips help. It looks great now and the functionality is getting there.. @0ip we could merge this into core once it's stable but I would strongly be minded that in "Settings" we provide a "Use Rich Text Editing" checkbox that enables this on a per user(And/or Global) basis. This checkbox may turn on "Change font size, font face and headings" I want to avoid at all costs cluttering the toolbar. |
Many thanks for your precise and valuable feedback @johnyma22 . I fixed 3 of the issues you reported. In my opinion the second one is more a feature than a bug :) In my mind, Headings have a semantical value, not only a formating one.
I agree that it would be nice to get an option to move to raw text/minimal text editor. Some editors are completly cluttered by their "user friendly" interface and we definitively want to avoid it. Maybe someone else could implement it in order no to mix the features between pull requests ? |
The soonest I can test and pull this is Thursday. Two reasons a) I'm really busy at the mo |
What's the state of this pull request ? |
@Pita was due to update me over the weekend but never did.. Did you manage to get this as "disabled by default" with a setting to show it? |
I'll give it a try later this week. Is it OK if the button is not shown but the titles are still rendered properly if set from another client ? |
Yep :) -----Original Message----- I'll give it a try later this week. Is it OK if the button is not shown but the titles are still rendered properly if set from another client ? Reply to this email directly or view it on GitHub: |
I'll give it a try later this week Jean-Tiare LE BIGOT -------- Original message -------- @Pita was due to update me over the weekend but never did.. Did you manage to get this as "disabled by default" with a setting to show it? Reply to this email directly or view it on GitHub: |
I had a quick look at it. I think it's pretty easy to do something I suggest to do it as suggested for a long time: move the toolbar As this is a big rework, I think that the best would be to merge this I estimate the duration to 3 weeks of spare time work. What is you opinion on this ? Le lundi 12 mars 2012 à 04:06 -0700, John McLear a écrit :
Jean-Tiare LE BIGOT |
I have been working a bit on an EJS-based templating system for the plugin framework. With this it would be easy to generate (parts of) the toolbar using hook calls from plugins, regardless of the html markup needed. Also, I wonder if this whole patch couldn't be done as a plugin? Esp. check if your changes overlap with the hooks.callAll calls inside the ace, or even generates a conflict... |
I spoke to @scrummitch today and we're going to hack on this on Monday. @jtlebi @redhog can you be about on skype/jabber etc.? |
I can manage IRC/Gtalk monday but not fulltime as I'm at the university |
Hm, monday evening is fine, monday day sporadically - I can't give it much time as I'm working for clients, but I should be able to answer the odd question. |
any news ? |
Still planning to introduce this as a plugin. Leaving this pull request open so we can refer to the changes whilst writing :) |
The plugin framework is now available in the develop branch, however there are no docs and it might be a bit fragile :P |
Last time I looked at the plugin framework, it was not compatible with this pull request. As i tried to make it the less intrusive as possible, it is tightly integrated with the list code. While moving it to a real plugin is definitively the best option, I'm not sure the bas code in the core is ready for that. |
The code in core is definitely ready for adding heading support and If you feel that you're missing a hook in the list code specifically, On 04/03/2012 12:11 AM, Jean-Tiare LE BIGOT wrote:
Konsulent, Fri Programvare / Free Software Consultant VARNING! E-post och ALL Internettrafik till och från Sverige, eller som passerar servrar i Sverige, avlyssnas av Försvarets Radioanstalt, FRA. (Text från Journalistförbundet) E-mail and ALL Internet Communications to and from Sweden, or via servers in Sweden, is monitored by the National Defence Radio Establishment. (Text from Journalistförbundet) |
thanks @redhog :) For now on, I close this Pull request. I'll try to start over soon from a clean branch to preserve a meaningful history. |
@jtlebi Note that the SketchSpace plugin is still very beta. It is good as example code for the hooks, and it does work, but installation is rather... magic :( For now, here are some tips: Clone the repo to $YOURETHERPADROOT/available_plugins/ep_sketchspace |
I'll give it a try next week. In the mean time, Can you confirm me that the only mandatory files are package.json and ep.json ? Then, appart from the npm stuffs, there is no other steps like registering to do (yet) ? Thanks ! |
@jtlebi Yes, the only required files are ep.json and package.json. You might want to have a look at and those plugins do implement very simple features in a few lines |
Here is a preliminary but fully functional implementation of title support for etherpad-lite.
This implementation relies a lot on the list infrastructure that I know quite well. My next project is to slowly refactor it to to ease the addition of new formating features.
I also added a few comments blocks in the code to help ou new contributors understanding the architecture.
Hope you enjoy it :)
EDIT: I have no idea why github indicates that the code is 3 month old. I created the branch yesterday ! It should be easier to merge than ordered list support.