@ -0,0 +1,269 @@
|
||||
|
||||
use stdweb::{unstable::{TryInto, TryFrom}, web::{*, html_element::*, event::*}};
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
use CATALOG;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
macro_rules! mv {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
( $( $var:ident ),* => $exp:expr ) => {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
{
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
$( let $var = $var.clone(); )*
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
$exp
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn get_elt_value(id: &'static str) -> String {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let elt = document().get_element_by_id(id).unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let inp: Result<InputElement, _> = elt.clone().try_into();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let textarea: Result<TextAreaElement, _> = elt.try_into();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
inp.map(|i| i.raw_value()).unwrap_or_else(|_| textarea.unwrap().value())
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn set_value<S: AsRef<str>>(id: &'static str, val: S) {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let elt = document().get_element_by_id(id).unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let inp: Result<InputElement, _> = elt.clone().try_into();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let textarea: Result<TextAreaElement, _> = elt.try_into();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
inp.map(|i| i.set_raw_value(val.as_ref()))
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
.unwrap_or_else(|_| textarea.unwrap().set_value(val.as_ref()))
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn no_return(evt: KeyDownEvent) {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
if evt.key() == "Enter" {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
evt.prevent_default();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
#[derive(Debug)]
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
pub enum EditorError {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
NoneError,
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
DOMError,
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
TypeError,
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
impl From<std::option::NoneError> for EditorError {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn from(_: std::option::NoneError) -> Self {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
EditorError::NoneError
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
impl From<stdweb::web::error::InvalidCharacterError> for EditorError {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn from(_: stdweb::web::error::InvalidCharacterError) -> Self {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
EditorError::DOMError
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
impl From<stdweb::private::TODO> for EditorError {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn from(_: stdweb::private::TODO) -> Self {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
EditorError::DOMError
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
impl From<stdweb::private::ConversionError> for EditorError {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn from(_: stdweb::private::ConversionError) -> Self {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
EditorError::TypeError
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn init_widget(
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
parent: &Element,
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
tag: &'static str,
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
placeholder_text: String,
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
content: String,
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
disable_return: bool
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
) -> Result<HtmlElement, EditorError> {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let widget = placeholder(make_editable(tag).try_into()?, &placeholder_text);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
if !content.is_empty() {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
widget.dataset().insert("edited", "true")?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
widget.append_child(&document().create_text_node(&content));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
if disable_return {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
widget.add_event_listener(no_return);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
parent.append_child(&widget);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
// We need to do that to make sure the placeholder is correctly rendered
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
widget.focus();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
widget.blur();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
Ok(widget)
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
pub fn init() -> Result<(), EditorError> {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
if let Some(ed) = document().get_element_by_id("plume-editor") {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
// Show the editor
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
js!{ @{&ed}.style.display = "block"; };
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
// And hide the HTML-only fallback
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let old_ed = document().get_element_by_id("plume-fallback-editor")?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let old_title = document().get_element_by_id("plume-editor-title")?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
js! {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
@{&old_ed}.style.display = "none";
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
@{&old_title}.style.display = "none";
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
};
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
// Get content from the old editor (when editing an article for instance)
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let title_val = get_elt_value("title");
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let subtitle_val = get_elt_value("subtitle");
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let content_val = get_elt_value("editor-content");
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
// And pre-fill the new editor with this values
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let title = init_widget(&ed, "h1", i18n!(CATALOG, "Title"), title_val, true)?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let subtitle = init_widget(&ed, "h2", i18n!(CATALOG, "Subtitle or summary"), subtitle_val, true)?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let content = init_widget(&ed, "article", i18n!(CATALOG, "Write your article here. Markdown is supported."), content_val.clone(), true)?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
js! { @{&content}.innerHTML = @{content_val}; };
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
// character counter
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
content.add_event_listener(mv!(content => move |_: KeyDownEvent| {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
window().set_timeout(mv!(content => move || {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
if let Some(e) = document().get_element_by_id("char-count") {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let count = chars_left("#plume-fallback-editor", &content).unwrap_or_default();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let text = i18n!(CATALOG, "Around {} characters left"; count);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
HtmlElement::try_from(e).map(|e| {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
js!{@{e}.innerText = @{text}};
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}).ok();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
};
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}), 0);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
document().get_element_by_id("publish")?.add_event_listener(mv!(title, subtitle, content, old_ed => move |_: ClickEvent| {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let popup = document().get_element_by_id("publish-popup").or_else(||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
init_popup(&title, &subtitle, &content, &old_ed).ok()
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
).unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let bg = document().get_element_by_id("popup-bg").or_else(||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
init_popup_bg().ok()
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
).unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
popup.class_list().add("show").unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
bg.class_list().add("show").unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
Ok(())
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn init_popup(title: &HtmlElement, subtitle: &HtmlElement, content: &HtmlElement, old_ed: &Element) -> Result<Element, EditorError> {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let popup = document().create_element("div")?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
popup.class_list().add("popup")?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
popup.set_attribute("id", "publish-popup")?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let tags = get_elt_value("tags").split(',').map(str::trim).map(str::to_string).collect::<Vec<_>>();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let license = get_elt_value("license");
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
make_input(&i18n!(CATALOG, "Tags"), "popup-tags", &popup).set_raw_value(&tags.join(", "));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
make_input(&i18n!(CATALOG, "License"), "popup-license", &popup).set_raw_value(&license);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let cover_label = document().create_element("label")?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
cover_label.append_child(&document().create_text_node(&i18n!(CATALOG, "Cover")));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
cover_label.set_attribute("for", "cover")?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let cover = document().get_element_by_id("cover")?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
cover.parent_element()?.remove_child(&cover).ok();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
popup.append_child(&cover_label);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
popup.append_child(&cover);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let button = document().create_element("input")?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
js!{
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
@{&button}.type = "submit";
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
@{&button}.value = @{i18n!(CATALOG, "Publish")};
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
};
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
button.append_child(&document().create_text_node(&i18n!(CATALOG, "Publish")));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
button.add_event_listener(mv!(title, subtitle, content, old_ed => move |_: ClickEvent| {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
set_value("title", title.inner_text());
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
set_value("subtitle", subtitle.inner_text());
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
set_value("editor-content", js!{ return @{&content}.innerHTML }.as_str().unwrap_or_default());
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
set_value("tags", get_elt_value("popup-tags"));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let cover = document().get_element_by_id("cover").unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
cover.parent_element().unwrap().remove_child(&cover).ok();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
old_ed.append_child(&cover);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
set_value("license", get_elt_value("popup-license"));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
js! {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
@{&old_ed}.submit();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
};
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
popup.append_child(&button);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
document().body()?.append_child(&popup);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
Ok(popup)
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn init_popup_bg() -> Result<Element, EditorError> {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let bg = document().create_element("div")?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
bg.class_list().add("popup-bg")?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
bg.set_attribute("id", "popup-bg")?;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
document().body()?.append_child(&bg);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
bg.add_event_listener(|_: ClickEvent| close_popup());
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
Ok(bg)
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn chars_left(selector: &str, content: &HtmlElement) -> Option<i32> {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
match document().query_selector(selector) {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
Ok(Some(form)) => HtmlElement::try_from(form).ok().and_then(|form| {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
if let Some(len) = form.get_attribute("content-size").and_then(|s| s.parse::<i32>().ok()) {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
(js! {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let x = encodeURIComponent(@{content}.innerHTML)
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
.replace(/%20/g, "+")
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
.replace(/%0A/g, "%0D%0A")
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
.replace(new RegExp("[!'*()]", "g"), "XXX") // replace exceptions of encodeURIComponent with placeholder
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
.length + 2;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
console.log(x);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
return x;
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}).try_into().map(|c: i32| len - c).ok()
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
} else {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
None
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}),
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
_ => None,
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn close_popup() {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let hide = |x: Element| x.class_list().remove("show");
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
document().get_element_by_id("publish-popup").map(hide);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
document().get_element_by_id("popup-bg").map(hide);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn make_input(label_text: &str, name: &'static str, form: &Element) -> InputElement {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let label = document().create_element("label").unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
label.append_child(&document().create_text_node(label_text));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
label.set_attribute("for", name).unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let inp: InputElement = document().create_element("input").unwrap().try_into().unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
inp.set_attribute("name", name).unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
inp.set_attribute("id", name).unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
form.append_child(&label);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
form.append_child(&inp);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
inp
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn make_editable(tag: &'static str) -> Element {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let elt = document().create_element(tag).expect("Couldn't create editable element");
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
elt.set_attribute("contenteditable", "true").expect("Couldn't make element editable");
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
elt
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn placeholder<'a>(elt: HtmlElement, text: &'a str) -> HtmlElement {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
elt.dataset().insert("placeholder", text).unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
elt.dataset().insert("edited", "false").unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
elt.add_event_listener(mv!(elt => move |_: FocusEvent| {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
if elt.dataset().get("edited").unwrap().as_str() != "true" {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
clear_children(&elt);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
elt.add_event_listener(mv!(elt => move |_: BlurEvent| {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
if elt.dataset().get("edited").unwrap().as_str() != "true" {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
clear_children(&elt);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
let ph = document().create_element("span").expect("Couldn't create placeholder");
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
ph.class_list().add("placeholder").expect("Couldn't add class");
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
ph.append_child(&document().create_text_node(&elt.dataset().get("placeholder").unwrap_or(String::new())));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
elt.append_child(&ph);
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
elt.add_event_listener(mv!(elt => move |_: KeyUpEvent| {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
elt.dataset().insert("edited", if elt.inner_text().trim_matches('\n').is_empty() {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
"false"
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
} else {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
"true"
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}).expect("Couldn't update edition state");
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}));
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
elt
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
fn clear_children(elt: &HtmlElement) {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
for child in elt.child_nodes() {
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
elt.remove_child(&child).unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
||||
}
|
||||
trinity-1686a
commented 5 years ago
Review
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article, `<` and `>` where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richer
```suggestion
set_value("editor-content", js!{return @{&widgets.2}.innerHTML}.as_str().unwrap_or_default());
```
Review
I think it would be easy to avoid escaping here, I will try. I think it would be easy to avoid escaping here, I will try.
trinity-1686a
commented 5 years ago
Review
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
|
@ -1,56 +1,36 @@
|
||||
#![recursion_limit="128"]
|
||||
#![feature(decl_macro, proc_macro_hygiene, try_trait)]
|
||||
|
||||
extern crate gettext;
|
||||
#[macro_use]
|
||||
extern crate gettext_macros;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate stdweb;
|
||||
|
||||
use stdweb::{unstable::{TryFrom, TryInto}, web::{*, event::*}};
|
||||
use stdweb::{web::{*, event::*}};
|
||||
|
||||
init_i18n!("plume-front", en, fr);
|
||||
|
||||
mod editor;
|
||||
|
||||
compile_i18n!();
|
||||
|
||||
lazy_static! {
|
||||
static ref CATALOG: gettext::Catalog = {
|
||||
let catalogs = include_i18n!();
|
||||
let lang = js!{ return navigator.language }.into_string().unwrap();
|
||||
trinity-1686a
commented 5 years ago
Review
I love that it just works like in the back-end, with nothing more to I love that it just works like in the back-end, with nothing more to
Review
Yeah, that's really great! The only downside is that we include all the translations in the .wasm so it is a bit bigger, but there is like 3 or 4 messages for the moment so I guess it's fine (and I don't expect it to become much bigger, I think we will never have more than 30 messages for the front end). Yeah, that's really great! The only downside is that we include all the translations in the .wasm so it is a bit bigger, but there is like 3 or 4 messages for the moment so I guess it's fine (and I don't expect it to become much bigger, I think we will never have more than 30 messages for the front end).
trinity-1686a
commented 5 years ago
Review
considering all Plume translations (not plume-front) are 208k on my computer, any picture loaded on the front page must cost much more than having all translations available considering all Plume translations (not plume-front) are 208k on my computer, any picture loaded on the front page must cost much more than having all translations available
Review
so how big is the dynamic front-end right now? and how much of that is cachable? so how big is the dynamic front-end right now? and how much of that is cachable?
Review
It is 2.2M on my computer, but there are various ways to optimize WASM size that we didn't explored yet. And I don't know how much of it is cachable? Nothing? It is 2.2M on my computer, but there are various ways to optimize WASM size that we didn't explored yet. And I don't know how much of it is cachable? Nothing?
trinity-1686a
commented 5 years ago
Review
I'd say everything, it's a static file after all. I tried compiling with I'd say everything, it's a static file after all. I tried compiling with `cargo web deploy --release`, it seems to work, and is "only" 832k. We could also try to compact plume-front.js as it's 35k with indentation and things, however I'm not sure it's that important
|
||||
let lang = lang.splitn(2, '-').next().unwrap_or("en");
|
||||
catalogs.iter().find(|(l, _)| l == &lang).unwrap_or(&catalogs[0]).clone().1
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {
|
||||
editor_loop();
|
||||
menu();
|
||||
search();
|
||||
}
|
||||
|
||||
/// Auto expands the editor when adding text and count chars
|
||||
fn editor_loop() {
|
||||
match document().query_selector("#plume-editor") {
|
||||
Ok(Some(x)) => HtmlElement::try_from(x).map(|article_content| {
|
||||
let offset = article_content.offset_height() - (article_content.get_bounding_client_rect().get_height() as i32);
|
||||
article_content.add_event_listener(move |_: KeyDownEvent| {
|
||||
let article_content = document().query_selector("#plume-editor").ok();
|
||||
js! {
|
||||
@{&article_content}.style.height = "auto";
|
||||
@{&article_content}.style.height = @{&article_content}.scrollHeight - @{offset} + "px";
|
||||
};
|
||||
window().set_timeout(|| {match document().query_selector("#post-form") {
|
||||
Ok(Some(form)) => HtmlElement::try_from(form).map(|form| {
|
||||
if let Some(len) = form.get_attribute("content-size").and_then(|s| s.parse::<i32>().ok()) {
|
||||
let consumed: i32 = js!{
|
||||
var len = - 1;
|
||||
for(var i = 0; i < @{&form}.length; i++) {
|
||||
if(@{&form}[i].name != "") {
|
||||
len += @{&form}[i].name.length + encodeURIComponent(@{&form}[i].value)
|
||||
.replace(/%20/g, "+")
|
||||
.replace(/%0A/g, "%0D%0A")
|
||||
.replace(new RegExp("[!'*()]", "g"), "XXX") //replace exceptions of encodeURIComponent with placeholder
|
||||
.length + 2;
|
||||
}
|
||||
}
|
||||
return len;
|
||||
}.try_into().unwrap_or_default();
|
||||
match document().query_selector("#editor-left") {
|
||||
Ok(Some(e)) => HtmlElement::try_from(e).map(|e| {
|
||||
js!{@{e}.innerText = (@{len-consumed})};
|
||||
}).ok(),
|
||||
_ => None,
|
||||
};
|
||||
}
|
||||
}).ok(),
|
||||
_ => None,
|
||||
};}, 0);
|
||||
});
|
||||
}).ok(),
|
||||
_ => None
|
||||
};
|
||||
editor::init()
|
||||
.map_err(|e| console!(error, format!("Editor error: {:?}", e))).ok();
|
||||
}
|
||||
|
||||
/// Toggle menu on mobile device
|
||||
|
@ -0,0 +1,45 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: plume-front\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-06-15 16:33-0700\n"
|
||||
"PO-Revision-Date: 2018-06-15 16:33-0700\n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: en\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
# plume-front/src/editor.rs:57
|
||||
msgid "Title"
|
||||
msgstr "Title"
|
||||
|
||||
# plume-front/src/editor.rs:61
|
||||
msgid "Subtitle or summary"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:68
|
||||
msgid "Write your article here. Markdown is supported."
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:46
|
||||
msgid "Around {} characters left"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:96
|
||||
msgid "Tags"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:97
|
||||
msgid "License"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:100
|
||||
msgid "Cover"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:111
|
||||
msgid "Publish"
|
||||
msgstr ""
|
@ -0,0 +1,45 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: plume-front\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-06-15 16:33-0700\n"
|
||||
"PO-Revision-Date: 2018-06-15 16:33-0700\n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
# plume-front/src/editor.rs:57
|
||||
msgid "Title"
|
||||
msgstr "Titre"
|
||||
|
||||
# plume-front/src/editor.rs:61
|
||||
msgid "Subtitle or summary"
|
||||
msgstr "Sous-titre ou résumé"
|
||||
|
||||
# plume-front/src/editor.rs:68
|
||||
msgid "Write your article here. Markdown is supported."
|
||||
msgstr "Écrivez votre article ici. Vous pouvez utiliser du Markdown."
|
||||
|
||||
# plume-front/src/editor.rs:46
|
||||
msgid "Around {} characters left"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:96
|
||||
msgid "Tags"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:97
|
||||
msgid "License"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:100
|
||||
msgid "Cover"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:111
|
||||
msgid "Publish"
|
||||
msgstr "Publier"
|
@ -0,0 +1,45 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: plume-front\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-06-15 16:33-0700\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
||||
|
||||
# plume-front/src/editor.rs:103
|
||||
msgid "Title"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:104
|
||||
msgid "Subtitle or summary"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:105
|
||||
msgid "Write your article here. Markdown is supported."
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:113
|
||||
msgid "Around {} characters left"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:143
|
||||
msgid "Tags"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:144
|
||||
msgid "License"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:147
|
||||
msgid "Cover"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:157
|
||||
msgid "Publish"
|
||||
msgstr ""
|
By doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
<
and>
where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richerBy doing the following change, I was able to copy past a picture in a post and have it rendered as expected. However when re-editing the article,
<
and>
where escaped, leading to a messy html tag in the middle of the content. I don't know if this is considered in scope for this pr, but this might be something to look at, as it will get important once the editor get richerI think it would be easy to avoid escaping here, I will try.
I think it would be easy to avoid escaping here, I will try.
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away
this closure is really long. It would gain in readability to be divided in multiple smaller functions called one after an other (like "hide non-js form", "add js editor", "show popup", "copy editor to form"...). I understand what it's doing, but if there is something wrong, it's too complex to see it right away