Commit 0f16d3e7 by chenshu

fix:优化样式

parent 33063f28
...@@ -156,6 +156,7 @@ class GraphicsEditor extends React.Component { ...@@ -156,6 +156,7 @@ class GraphicsEditor extends React.Component {
const videoCount = ((html || '').match(/<iframe/g) || []).length; const videoCount = ((html || '').match(/<iframe/g) || []).length;
const imageCount = ((html || '').match(/<img/g) || []).length; const imageCount = ((html || '').match(/<img/g) || []).length;
const textLength = this.editorInt.txt.text().replace(/\&nbsp\;/ig, ' ').length + videoCount + imageCount; const textLength = this.editorInt.txt.text().replace(/\&nbsp\;/ig, ' ').length + videoCount + imageCount;
console.log(html, 777777)
this.setState({ textLength }, () => { this.setState({ textLength }, () => {
onChange(html, this.state.textLength); onChange(html, this.state.textLength);
}) })
......
...@@ -308,7 +308,7 @@ class AddGraphicsCourse extends React.Component { ...@@ -308,7 +308,7 @@ class AddGraphicsCourse extends React.Component {
const { ossUrl } = file; const { ossUrl } = file;
const { courseMedia } = this.state; const { courseMedia } = this.state;
this.setState({ this.setState({
courseMedia: `${courseMedia}<p style="width: 100%;padding-top: 56.25%;position: relative;"><iframe style="position: absolute;width: 100%;height: 100%;top: 0;left: 0;" src="${ossUrl}" /><br/><p>` courseMedia: `${courseMedia}<p style="width: 100%;padding-top: 56.25%;position: relative;"><iframe style="position: absolute;width: 100%;height: 100%;top: 0;left: 0;" src="${ossUrl}"></iframe><br/></p><p><br/></p>`
}); });
} }
...@@ -318,7 +318,6 @@ class AddGraphicsCourse extends React.Component { ...@@ -318,7 +318,6 @@ class AddGraphicsCourse extends React.Component {
}) })
const { ossUrl } = file; const { ossUrl } = file;
const { courseMedia, introduce, isContent } = this.state; const { courseMedia, introduce, isContent } = this.state;
console.log(isContent, 55555555)
this.setState({ this.setState({
[isContent ? 'courseMedia' : 'introduce']: `${isContent ? courseMedia : introduce}<p><img style="max-width: 100%;" src="${ossUrl}" /><br/><p>` [isContent ? 'courseMedia' : 'introduce']: `${isContent ? courseMedia : introduce}<p><img style="max-width: 100%;" src="${ossUrl}" /><br/><p>`
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment