Sefaria / Sefaria-Project

New Interfaces for Jewish Texts
https://www.sefaria.org
651 stars 264 forks source link

Size formatting for sources in source sheets #49

Closed herlands closed 10 years ago

herlands commented 11 years ago

Would it be possible to add the ability to change size formatting for sources? I see this functionality useful in a few ways:

1) When copying text into Sefaria sometimes the sizes dont match. 2) Many people like de-emphasizing certain parts of sources by shrinking their size while still keeping the entire source on the source sheet.

blockspeiser commented 11 years ago

This is on the way. Rich editing in source sheets currently uses www.hallojs.org which is limited to the formatting options you see now. I'm planning on migrating to http://mindmup.github.io/bootstrap-wysiwyg/ which includes many more options.

ndavidovics commented 11 years ago

Is this on the way? this has been a feature request from my teachers and I'd be happy to work on it

blockspeiser commented 11 years ago

I am going be focusing more on Source Sheets this month, but I have a very long list (https://workflowy.com/shared/aaaff9c0-695e-3ff6-4c38-76c5b49ba1c6/), so I'd love it if you were interested in working on this.

I started playing with http://mindmup.github.io/bootstrap-wysiwyg/ a little bit earlier -- I found it not quite as easy to set up and use as I had hoped, but it may still be the best option.

hallo.js has been pretty great all in all, but they do not have support for fonts, font-size or an option to remove formatting. They have a whole plugin structure, so you may be able to create the needed plugins for hallo.js. I personally never got my head around it, since hallo.js and the example plugins are written in CoffeeScript which I have never used.

ndavidovics commented 11 years ago

The hallo plugin is so lightweight and easy to use, it would be a shame to give it up I think just adding a plugin to change font-size in hallo would be best I'll work on that

Great work on sefaria so far by the way

Noam

On Mon, Aug 5, 2013 at 1:01 PM, blockspeiser notifications@github.comwrote:

I am going be focusing more on Source Sheets this month, but I have a very long list ( https://workflowy.com/shared/aaaff9c0-695e-3ff6-4c38-76c5b49ba1c6/), so I'd love it if you were interested in working on this.

I started playing with http://mindmup.github.io/bootstrap-wysiwyg/ a little bit earlier -- I found it not quite as easy to set up and use as I had hoped, but it may still be the best option.

hallo.js has been pretty great all in all, but they do not have support for fonts, font-size or an option to remove formatting. They have a whole plugin structure, so you may be able to create the needed plugins for hallo.js. I personally never got my head around it, since hallo.js and the example plugins are written in CoffeeScript which I have never used.

— Reply to this email directly or view it on GitHubhttps://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-22124349 .

blockspeiser commented 11 years ago

Any thoughts on keeping hallo.js? thanks

herlands commented 11 years ago

I don't have the time to implement it, but I highly recommend switching to the bootstrap option.

1) hallo.js seems pretty restrictive and different educators like to use source sheets in a variety of ways. Keeping hallo.js would force people to change their style, not enable them to make source sheets easier.

2) Aside from the textual manipulation, the bootstrap option allows for more dynamic source which link to the web and include images.

blockspeiser commented 10 years ago

I've been looking into the options for this today. I would say this is our most requested feature right now, but in addition to font size we've had many request to be able to support changing the font face and the text color.

As far as I can see, the number of options that support all 3 is quite limited. I'm currently looking into http://ckeditor.com/. Let me know if anyone has any other suggestions.

blockspeiser commented 10 years ago

I've pushed at first pass at rich editing with CKEditor to this branch https://github.com/blockspeiser/Sefaria-Project/tree/ckeditor

Which is currently deployed to http://staging.sefaria.org

Any help in testing is welcome. Note: the above link points to production data, so it may be better to create a new source sheet for testing just in case something in this branch accidentally overwrites data.

ndavidovics commented 10 years ago

great work. on the new text editor.

Clicking the "remove formatting" button seems to break the editor

I'd be happy to try and debug this (though for now, probably just removing the button is the best idea) if you can point me more to the codes location

Thanks

Noam

On Tue, Dec 24, 2013 at 8:30 PM, blockspeiser notifications@github.comwrote:

I've pushed at first pass at rich editing with CKEditor to this branch https://github.com/blockspeiser/Sefaria-Project/tree/ckeditor

Which is currently deployed to http://staging.sefaria.org

Any help in testing is welcome. Note: the above link points to production data, so it may be better to create a new source sheet for testing just in case something in this branch accidentally overwrites data.

— Reply to this email directly or view it on GitHubhttps://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31189904 .

blockspeiser commented 10 years ago

Thanks for testing! This isn't good to hear. What OS/Browser are you using?

I've tested this on latest Mac Chrome/Firefox/Safari and haven't had any issues with the remove formatting button. Are you on Windows?

That button is a very important button.

On Mon, Jan 6, 2014 at 9:59 AM, ndavidovics notifications@github.comwrote:

great work. on the new text editor.

Clicking the "remove formatting" button seems to break the editor

I'd be happy to try and debug this (though for now, probably just removing the button is the best idea) if you can point me more to the codes location

Thanks

Noam

On Tue, Dec 24, 2013 at 8:30 PM, blockspeiser notifications@github.comwrote:

I've pushed at first pass at rich editing with CKEditor to this branch https://github.com/blockspeiser/Sefaria-Project/tree/ckeditor

Which is currently deployed to http://staging.sefaria.org

Any help in testing is welcome. Note: the above link points to production data, so it may be better to create a new source sheet for testing just in case something in this branch accidentally overwrites data.

— Reply to this email directly or view it on GitHub< https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31189904>

.

— Reply to this email directly or view it on GitHubhttps://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31670211 .

ndavidovics commented 10 years ago

Chrome on Windows 7 This occurs in FF and IE as well

I should have been more specific in the steps to reconstruct

1) Create new source sheet 2) Add a source with english 3) Make one word bold on the english side 4) Click on the hebrew side to bring up the editor 5) Click back on the bolded word on the english side 6) Click the remove formatting button 7) The editor breaks

This may affect more than the remove formatting button... having multiple editor instances may be causing other issues...

Noam

On Mon, Jan 6, 2014 at 12:15 PM, blockspeiser notifications@github.comwrote:

Thanks for testing! This isn't good to hear. What OS/Browser are you using?

I've tested this on latest Mac Chrome/Firefox/Safari and haven't had any issues with the remove formatting button. Are you on Windows?

That button is a very important button.

On Mon, Jan 6, 2014 at 9:59 AM, ndavidovics notifications@github.comwrote:

great work. on the new text editor.

Clicking the "remove formatting" button seems to break the editor

I'd be happy to try and debug this (though for now, probably just removing the button is the best idea) if you can point me more to the codes location

Thanks

Noam

On Tue, Dec 24, 2013 at 8:30 PM, blockspeiser notifications@github.comwrote:

I've pushed at first pass at rich editing with CKEditor to this branch https://github.com/blockspeiser/Sefaria-Project/tree/ckeditor

Which is currently deployed to http://staging.sefaria.org

Any help in testing is welcome. Note: the above link points to production data, so it may be better to create a new source sheet for testing just in case something in this branch accidentally overwrites data.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31189904>

.

— Reply to this email directly or view it on GitHub< https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31670211>

.

— Reply to this email directly or view it on GitHubhttps://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31671668 .

blockspeiser commented 10 years ago

Thanks. This is very helpful. I've reverted the editor on the site for now

This design is intended to only have one editor open at any time - it's intended to close on any outside click or before a new editor opens. Looks like it's not fully baked. I'll do some debugging - any further thoughts welcome!

On Mon, Jan 6, 2014 at 10:55 AM, ndavidovics notifications@github.comwrote:

Chrome on Windows 7 This occurs in FF and IE as well

I should have been more specific in the steps to reconstruct

1) Create new source sheet 2) Add a source with english 3) Make one word bold on the english side 4) Click on the hebrew side to bring up the editor 5) Click back on the bolded word on the english side 6) Click the remove formatting button 7) The editor breaks

This may affect more than the remove formatting button... having multiple editor instances may be causing other issues...

Noam

On Mon, Jan 6, 2014 at 12:15 PM, blockspeiser notifications@github.comwrote:

Thanks for testing! This isn't good to hear. What OS/Browser are you using?

I've tested this on latest Mac Chrome/Firefox/Safari and haven't had any issues with the remove formatting button. Are you on Windows?

That button is a very important button.

On Mon, Jan 6, 2014 at 9:59 AM, ndavidovics notifications@github.comwrote:

great work. on the new text editor.

Clicking the "remove formatting" button seems to break the editor

I'd be happy to try and debug this (though for now, probably just removing the button is the best idea) if you can point me more to the codes location

Thanks

Noam

On Tue, Dec 24, 2013 at 8:30 PM, blockspeiser < notifications@github.com>wrote:

I've pushed at first pass at rich editing with CKEditor to this branch https://github.com/blockspeiser/Sefaria-Project/tree/ckeditor

Which is currently deployed to http://staging.sefaria.org

Any help in testing is welcome. Note: the above link points to production data, so it may be better to create a new source sheet for testing just in case something in this branch accidentally overwrites data.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31189904>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31670211>

.

— Reply to this email directly or view it on GitHub< https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31671668>

.

— Reply to this email directly or view it on GitHubhttps://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31675405 .

ndavidovics commented 10 years ago

How much of a rewrite would it be to place the entire page under one ckeditor instance?

On Mon, Jan 6, 2014 at 1:15 PM, blockspeiser notifications@github.comwrote:

Thanks. This is very helpful. I've reverted the editor on the site for now

  • but it's still up on staging.sefaria.org.

This design is intended to only have one editor open at any time - it's intended to close on any outside click or before a new editor opens. Looks like it's not fully baked. I'll do some debugging - any further thoughts welcome!

On Mon, Jan 6, 2014 at 10:55 AM, ndavidovics notifications@github.comwrote:

Chrome on Windows 7 This occurs in FF and IE as well

I should have been more specific in the steps to reconstruct

1) Create new source sheet 2) Add a source with english 3) Make one word bold on the english side 4) Click on the hebrew side to bring up the editor 5) Click back on the bolded word on the english side 6) Click the remove formatting button 7) The editor breaks

This may affect more than the remove formatting button... having multiple editor instances may be causing other issues...

Noam

On Mon, Jan 6, 2014 at 12:15 PM, blockspeiser notifications@github.comwrote:

Thanks for testing! This isn't good to hear. What OS/Browser are you using?

I've tested this on latest Mac Chrome/Firefox/Safari and haven't had any issues with the remove formatting button. Are you on Windows?

That button is a very important button.

On Mon, Jan 6, 2014 at 9:59 AM, ndavidovics notifications@github.comwrote:

great work. on the new text editor.

Clicking the "remove formatting" button seems to break the editor

I'd be happy to try and debug this (though for now, probably just removing the button is the best idea) if you can point me more to the codes location

Thanks

Noam

On Tue, Dec 24, 2013 at 8:30 PM, blockspeiser < notifications@github.com>wrote:

I've pushed at first pass at rich editing with CKEditor to this branch https://github.com/blockspeiser/Sefaria-Project/tree/ckeditor

Which is currently deployed to http://staging.sefaria.org

Any help in testing is welcome. Note: the above link points to production data, so it may be better to create a new source sheet for testing just in case something in this branch accidentally overwrites data.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31189904>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31670211>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31671668>

.

— Reply to this email directly or view it on GitHub< https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31675405>

.

— Reply to this email directly or view it on GitHubhttps://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31677301 .

blockspeiser commented 10 years ago

I think it would be pretty huge. Source Sheets are saved a JSON and the JSON is used to build HTML client side. That structure is what makes it possible to switch between English/Hebrew and switch layout dynamically. We also like the fact that as a build our library of source sheets we are capturing implicit relationships between different sources (as named by citations) which could one day feed into a Torah recommendation engine. From what I've seen of CKEditor so far, I think it would be big task to make sure it doesn't clobber any of the structure that we want to always keep in a sheet.

On Mon, Jan 6, 2014 at 11:26 AM, ndavidovics notifications@github.comwrote:

How much of a rewrite would it be to place the entire page under one ckeditor instance?

On Mon, Jan 6, 2014 at 1:15 PM, blockspeiser notifications@github.comwrote:

Thanks. This is very helpful. I've reverted the editor on the site for now

  • but it's still up on staging.sefaria.org.

This design is intended to only have one editor open at any time - it's intended to close on any outside click or before a new editor opens. Looks like it's not fully baked. I'll do some debugging - any further thoughts welcome!

On Mon, Jan 6, 2014 at 10:55 AM, ndavidovics notifications@github.comwrote:

Chrome on Windows 7 This occurs in FF and IE as well

I should have been more specific in the steps to reconstruct

1) Create new source sheet 2) Add a source with english 3) Make one word bold on the english side 4) Click on the hebrew side to bring up the editor 5) Click back on the bolded word on the english side 6) Click the remove formatting button 7) The editor breaks

This may affect more than the remove formatting button... having multiple editor instances may be causing other issues...

Noam

On Mon, Jan 6, 2014 at 12:15 PM, blockspeiser < notifications@github.com>wrote:

Thanks for testing! This isn't good to hear. What OS/Browser are you using?

I've tested this on latest Mac Chrome/Firefox/Safari and haven't had any issues with the remove formatting button. Are you on Windows?

That button is a very important button.

On Mon, Jan 6, 2014 at 9:59 AM, ndavidovics < notifications@github.com>wrote:

great work. on the new text editor.

Clicking the "remove formatting" button seems to break the editor

I'd be happy to try and debug this (though for now, probably just removing the button is the best idea) if you can point me more to the codes location

Thanks

Noam

On Tue, Dec 24, 2013 at 8:30 PM, blockspeiser < notifications@github.com>wrote:

I've pushed at first pass at rich editing with CKEditor to this branch https://github.com/blockspeiser/Sefaria-Project/tree/ckeditor

Which is currently deployed to http://staging.sefaria.org

Any help in testing is welcome. Note: the above link points to production data, so it may be better to create a new source sheet for testing just in case something in this branch accidentally overwrites data.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31189904>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31670211>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31671668>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31675405>

.

— Reply to this email directly or view it on GitHub< https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31677301>

.

— Reply to this email directly or view it on GitHubhttps://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31678273 .

ndavidovics commented 10 years ago

Have you looked at Aloha editor? seems to handle multiple divs well without needing multiple instances http://www.aloha-editor.org/index.php

On Mon, Jan 6, 2014 at 1:37 PM, blockspeiser notifications@github.comwrote:

I think it would be pretty huge. Source Sheets are saved a JSON and the JSON is used to build HTML client side. That structure is what makes it possible to switch between English/Hebrew and switch layout dynamically. We also like the fact that as a build our library of source sheets we are capturing implicit relationships between different sources (as named by citations) which could one day feed into a Torah recommendation engine. From what I've seen of CKEditor so far, I think it would be big task to make sure it doesn't clobber any of the structure that we want to always keep in a sheet.

On Mon, Jan 6, 2014 at 11:26 AM, ndavidovics notifications@github.comwrote:

How much of a rewrite would it be to place the entire page under one ckeditor instance?

On Mon, Jan 6, 2014 at 1:15 PM, blockspeiser notifications@github.comwrote:

Thanks. This is very helpful. I've reverted the editor on the site for now

  • but it's still up on staging.sefaria.org.

This design is intended to only have one editor open at any time - it's intended to close on any outside click or before a new editor opens. Looks like it's not fully baked. I'll do some debugging - any further thoughts welcome!

On Mon, Jan 6, 2014 at 10:55 AM, ndavidovics notifications@github.comwrote:

Chrome on Windows 7 This occurs in FF and IE as well

I should have been more specific in the steps to reconstruct

1) Create new source sheet 2) Add a source with english 3) Make one word bold on the english side 4) Click on the hebrew side to bring up the editor 5) Click back on the bolded word on the english side 6) Click the remove formatting button 7) The editor breaks

This may affect more than the remove formatting button... having multiple editor instances may be causing other issues...

Noam

On Mon, Jan 6, 2014 at 12:15 PM, blockspeiser < notifications@github.com>wrote:

Thanks for testing! This isn't good to hear. What OS/Browser are you using?

I've tested this on latest Mac Chrome/Firefox/Safari and haven't had any issues with the remove formatting button. Are you on Windows?

That button is a very important button.

On Mon, Jan 6, 2014 at 9:59 AM, ndavidovics < notifications@github.com>wrote:

great work. on the new text editor.

Clicking the "remove formatting" button seems to break the editor

I'd be happy to try and debug this (though for now, probably just removing the button is the best idea) if you can point me more to the codes location

Thanks

Noam

On Tue, Dec 24, 2013 at 8:30 PM, blockspeiser < notifications@github.com>wrote:

I've pushed at first pass at rich editing with CKEditor to this branch https://github.com/blockspeiser/Sefaria-Project/tree/ckeditor

Which is currently deployed to http://staging.sefaria.org

Any help in testing is welcome. Note: the above link points to production data, so it may be better to create a new source sheet for testing just in case something in this branch accidentally overwrites data.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31189904>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31670211>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31671668>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31675405>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31677301>

.

— Reply to this email directly or view it on GitHub< https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31678273>

.

— Reply to this email directly or view it on GitHubhttps://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31679373 .

ndavidovics commented 10 years ago

also this plugin to add font-size selector to it https://github.com/jstrouse/Aloha-Plugin-FontSize

On Mon, Jan 6, 2014 at 2:53 PM, Noam Davidovics ndavidovics@gmail.comwrote:

Have you looked at Aloha editor? seems to handle multiple divs well without needing multiple instances http://www.aloha-editor.org/index.php

On Mon, Jan 6, 2014 at 1:37 PM, blockspeiser notifications@github.comwrote:

I think it would be pretty huge. Source Sheets are saved a JSON and the JSON is used to build HTML client side. That structure is what makes it possible to switch between English/Hebrew and switch layout dynamically. We also like the fact that as a build our library of source sheets we are capturing implicit relationships between different sources (as named by citations) which could one day feed into a Torah recommendation engine. From what I've seen of CKEditor so far, I think it would be big task to make sure it doesn't clobber any of the structure that we want to always keep in a sheet.

On Mon, Jan 6, 2014 at 11:26 AM, ndavidovics notifications@github.comwrote:

How much of a rewrite would it be to place the entire page under one ckeditor instance?

On Mon, Jan 6, 2014 at 1:15 PM, blockspeiser notifications@github.comwrote:

Thanks. This is very helpful. I've reverted the editor on the site for now

  • but it's still up on staging.sefaria.org.

This design is intended to only have one editor open at any time - it's intended to close on any outside click or before a new editor opens. Looks like it's not fully baked. I'll do some debugging - any further thoughts welcome!

On Mon, Jan 6, 2014 at 10:55 AM, ndavidovics < notifications@github.com>wrote:

Chrome on Windows 7 This occurs in FF and IE as well

I should have been more specific in the steps to reconstruct

1) Create new source sheet 2) Add a source with english 3) Make one word bold on the english side 4) Click on the hebrew side to bring up the editor 5) Click back on the bolded word on the english side 6) Click the remove formatting button 7) The editor breaks

This may affect more than the remove formatting button... having multiple editor instances may be causing other issues...

Noam

On Mon, Jan 6, 2014 at 12:15 PM, blockspeiser < notifications@github.com>wrote:

Thanks for testing! This isn't good to hear. What OS/Browser are you using?

I've tested this on latest Mac Chrome/Firefox/Safari and haven't had any issues with the remove formatting button. Are you on Windows?

That button is a very important button.

On Mon, Jan 6, 2014 at 9:59 AM, ndavidovics < notifications@github.com>wrote:

great work. on the new text editor.

Clicking the "remove formatting" button seems to break the editor

I'd be happy to try and debug this (though for now, probably just removing the button is the best idea) if you can point me more to the codes location

Thanks

Noam

On Tue, Dec 24, 2013 at 8:30 PM, blockspeiser < notifications@github.com>wrote:

I've pushed at first pass at rich editing with CKEditor to this branch https://github.com/blockspeiser/Sefaria-Project/tree/ckeditor

Which is currently deployed to http://staging.sefaria.org

Any help in testing is welcome. Note: the above link points to production data, so it may be better to create a new source sheet for testing just in case something in this branch accidentally overwrites data.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31189904>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31670211>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31671668>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31675405>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31677301>

.

— Reply to this email directly or view it on GitHub< https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31678273>

.

— Reply to this email directly or view it on GitHubhttps://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31679373 .

blockspeiser commented 10 years ago

From our user feedback from educators in particular, font size, font face and font color were all highly requested. CKEditor was not my top choice at all - but it was (surprisingly) the only option I saw that supported all three.

On Mon, Jan 6, 2014 at 1:08 PM, ndavidovics notifications@github.comwrote:

also this plugin to add font-size selector to it https://github.com/jstrouse/Aloha-Plugin-FontSize

On Mon, Jan 6, 2014 at 2:53 PM, Noam Davidovics ndavidovics@gmail.comwrote:

Have you looked at Aloha editor? seems to handle multiple divs well without needing multiple instances http://www.aloha-editor.org/index.php

On Mon, Jan 6, 2014 at 1:37 PM, blockspeiser notifications@github.comwrote:

I think it would be pretty huge. Source Sheets are saved a JSON and the JSON is used to build HTML client side. That structure is what makes it possible to switch between English/Hebrew and switch layout dynamically. We also like the fact that as a build our library of source sheets we are capturing implicit relationships between different sources (as named by citations) which could one day feed into a Torah recommendation engine. From what I've seen of CKEditor so far, I think it would be big task to make sure it doesn't clobber any of the structure that we want to always keep in a sheet.

On Mon, Jan 6, 2014 at 11:26 AM, ndavidovics notifications@github.comwrote:

How much of a rewrite would it be to place the entire page under one ckeditor instance?

On Mon, Jan 6, 2014 at 1:15 PM, blockspeiser < notifications@github.com>wrote:

Thanks. This is very helpful. I've reverted the editor on the site for now

  • but it's still up on staging.sefaria.org.

This design is intended to only have one editor open at any time - it's intended to close on any outside click or before a new editor opens. Looks like it's not fully baked. I'll do some debugging - any further thoughts welcome!

On Mon, Jan 6, 2014 at 10:55 AM, ndavidovics < notifications@github.com>wrote:

Chrome on Windows 7 This occurs in FF and IE as well

I should have been more specific in the steps to reconstruct

1) Create new source sheet 2) Add a source with english 3) Make one word bold on the english side 4) Click on the hebrew side to bring up the editor 5) Click back on the bolded word on the english side 6) Click the remove formatting button 7) The editor breaks

This may affect more than the remove formatting button... having multiple editor instances may be causing other issues...

Noam

On Mon, Jan 6, 2014 at 12:15 PM, blockspeiser < notifications@github.com>wrote:

Thanks for testing! This isn't good to hear. What OS/Browser are you using?

I've tested this on latest Mac Chrome/Firefox/Safari and haven't had any issues with the remove formatting button. Are you on Windows?

That button is a very important button.

On Mon, Jan 6, 2014 at 9:59 AM, ndavidovics < notifications@github.com>wrote:

great work. on the new text editor.

Clicking the "remove formatting" button seems to break the editor

I'd be happy to try and debug this (though for now, probably just removing the button is the best idea) if you can point me more to the codes location

Thanks

Noam

On Tue, Dec 24, 2013 at 8:30 PM, blockspeiser < notifications@github.com>wrote:

I've pushed at first pass at rich editing with CKEditor to this branch

https://github.com/blockspeiser/Sefaria-Project/tree/ckeditor

Which is currently deployed to http://staging.sefaria.org

Any help in testing is welcome. Note: the above link points to production data, so it may be better to create a new source sheet for testing just in case something in this branch accidentally overwrites data.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31189904>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31670211>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31671668>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31675405>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31677301>

.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31678273>

.

— Reply to this email directly or view it on GitHub< https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31679373>

.

— Reply to this email directly or view it on GitHubhttps://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31687144 .

blockspeiser commented 10 years ago

I've just push a change to make sure that all existing CKEditors are destroyed before initializing a new one. This seems to Fix the problem. It's up now on http://staging.sefaria.org/sheets - any additional testing is welcome before I bring this back to prod! Thanks.

ndavidovics commented 10 years ago

Just tested it a bunch. Couldn't break it. Great job

Where is your code change?

On Tue, Jan 7, 2014 at 5:51 PM, blockspeiser notifications@github.comwrote:

I've just push a change to make sure that all existing CKEditors are destroyed before initializing a new one. This seems to Fix the problem. It's up now on http://staging.sefaria.org/sheets - any additional testing is welcome before I bring this back to prod! Thanks.

— Reply to this email directly or view it on GitHubhttps://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31792745 .

blockspeiser commented 10 years ago

The code change is here: https://github.com/blockspeiser/Sefaria-Project/commit/c4852415919cd4ff518bfef2b3c0ab4306c60072

It removes any existing CKEditor Instance before initializing a new one.

On Wed, Jan 8, 2014 at 11:45 AM, ndavidovics notifications@github.comwrote:

Just tested it a bunch. Couldn't break it. Great job

Where is your code change?

On Tue, Jan 7, 2014 at 5:51 PM, blockspeiser notifications@github.comwrote:

I've just push a change to make sure that all existing CKEditors are destroyed before initializing a new one. This seems to Fix the problem. It's up now on http://staging.sefaria.org/sheets - any additional testing is welcome before I bring this back to prod! Thanks.

— Reply to this email directly or view it on GitHub< https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31792745>

.

— Reply to this email directly or view it on GitHubhttps://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31870478 .

ndavidovics commented 10 years ago

Another small bug. When adding a page of Talmud, you have code in static/js/sheets.js lines 540 to 551 that I believe is attempting to shorten text and add ellipses (...) I am not sure if data is bad, or the code, but, for example, add Shabbat 13a to a sheet, you get this for the english side: (NaN) ... (NaN) ... (NaN) ... (NaN) ... So first, if there is no english, there probably shouldn't be any attempt to parse the english side in JS second, if the variable "start" is non numeric, the entire for loop should be avoided or should be re-written

Can you provide any color on what you were trying to do with this for loop?

Thanks

Noam

On Wed, Jan 8, 2014 at 6:31 PM, blockspeiser notifications@github.comwrote:

The code change is here:

https://github.com/blockspeiser/Sefaria-Project/commit/c4852415919cd4ff518bfef2b3c0ab4306c60072

It removes any existing CKEditor Instance before initializing a new one.

On Wed, Jan 8, 2014 at 11:45 AM, ndavidovics notifications@github.comwrote:

Just tested it a bunch. Couldn't break it. Great job

Where is your code change?

On Tue, Jan 7, 2014 at 5:51 PM, blockspeiser notifications@github.comwrote:

I've just push a change to make sure that all existing CKEditors are destroyed before initializing a new one. This seems to Fix the problem. It's up now on http://staging.sefaria.org/sheets - any additional testing is welcome before I bring this back to prod! Thanks.

— Reply to this email directly or view it on GitHub<

https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31792745>

.

— Reply to this email directly or view it on GitHub< https://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31870478>

.

— Reply to this email directly or view it on GitHubhttps://github.com/blockspeiser/Sefaria-Project/issues/49#issuecomment-31891782 .

blockspeiser commented 10 years ago

Thanks.... The problem came from assuming that a requested text was at the most specific granularity (e.g, Exodus 3:6) but Talmud and Commentary are allowed to be requested at one level higher (e.g., Sukkah 3b rather than Sukkah 3b:6).

This for loop is just for adding numbers to each segment. So if you request Exodus 3:6-9 the numbers start at 6 and end at 9. When whole daf (or any whole text section) is requested, the start point should just be set to 1 so it can count through the full amount.

I just checked in a fix at cca74468f1e0730e3cb93a96b6574aaa334304a3.