当前位置:网站首页>document editor
document editor
2022-06-10 03:50:00 【tianruine】
https://note.youdao.com/ynoteshare/index.html?id=4835579af41c46645f1d03eb81ccc655&type=note&_time=1654692325654
https://note.youdao.com/ynoteshare/index.html?id=4835579af41c46645f1d03eb81ccc655&type=note&_time=1654692325654
Agreement Management User agreement , Privacy agreement file -> Become a web page
Ideas :
1. b The client management platform uploads the web page code to the server
* front end Web page editor can input code
* Back end Provide the interface Save the code entered by the user to the database
2. C End Click the link Open Netease of user agreement
* The backend provides an interface According to id Get different html Structure returns to the front-end display
Using the rich text editor
Example : Plug in and code highlighting and color
import React, { PureComponent } from "react";
import { Input, Button } from "antd";
import { UnControlled as CodeMirror } from "react-codemirror2";
import "codemirror/lib/codemirror.css";
// Style theme
import "codemirror/theme/material.css";
// The code in the editor highlights
import "codemirror/mode/javascript/javascript";The overall code
import React, { PureComponent } from "react";
import { Input, Button } from "antd";
import { UnControlled as CodeMirror } from "react-codemirror2";
import "codemirror/lib/codemirror.css";
// Style theme
import "codemirror/theme/material.css";
// The code in the editor highlights
import "codemirror/mode/javascript/javascript";
import { createHtml } from "./service" // Send the code written in the front page to the back-end interface , Save the page to the server's database
class Demo extends PureComponent {
code = ''
title = ''
importHtml = async () => {
const result = await createHtml({
title: this.title,
code: this.code// Here, the code written in the rich text edit box is passed to the server through parameters
})
console.log(result)
}
render() {
return (
<div>
<label > Name of agreement </label>
<Input onChange={(e) => {
this.title = e.target.value
}}></Input>
{/* Here is the rich text editor , You can write code in it , Transfer to the server after writing */}
<CodeMirror
value="<h1> welcome lazy coder</h1>"
options={
{
mode: "javascript",
theme: "material",
lineNumbers: true,
}}
onChange={(eitor, data, value) => {
this.code = value
}}
/>
<hr />
<Button onClick={this.importHtml}> Import template </Button> {/* Click to call the interface for transferring pages to the server */}
</div>
);
}
componentDidMount() {}
}
export default Demo;
边栏推荐
- 【load dataset】
- Brush questions_ Linked list related series
- Storage of data (integer, floating-point, super detailed)
- QT window, viewport, logical coordinates, physical coordinates
- 反欺诈体系与设备指纹
- Using the responsibility chain pattern to reconstruct the original code
- Preorder traversal binary tree
- [mainstream nivida graphics card deep learning / intensive learning /ai computing power summary]
- 【yolov3损失函数】
- 汇编:代码示例
猜你喜欢

"Chinese characteristics" of Web3

Yolov5 target detection neural network -- calculation principle of loss function

【半监督分类】基于K-means和Label+Propagation的半监督网页分类

【Pytorch的优化器总结归纳】

Distributed current limiting: current limiting based on sentinel implementation (I) - Overview

Using the responsibility chain pattern to reconstruct the original code

Post Microsoft Build丨畅聊技术新风潮

Decision engine system & real-time index calculation & risk situation awareness system & risk data list system & fraud intelligence system

【加速 PyTorch 模型训练的 9 个技巧】
![[calculation method]](/img/59/7488d25f72ffa642de76d9cf743196.png)
[calculation method]
随机推荐
汇编:关于函数完整流程的栈桢解析
[pytorch model pruning example tutorial 3 (multi parameter and global pruning)]
redisson yml配置出错
Basic data types and sizeof understanding
[paper notes | deep reading] struc2vec: learning node representations from structural identity
汇编:汇编指令分类
All MySQL collections from 0 to 1 are highly recommended
How to open an account on your mobile phone? Is it safe to open an account online?
[summary of methods to improve accuracy]
Informatics Aosai yibentong 1260 [example 9.4] interceptor missile (noip1999) | Luogu p1020 [noip1999 popularization group] missile interception
ACL 2022 | the latest hot research in NLP field, you must not miss it!
【云原生 | Kubernetes篇】深入了解Ingress
[model compression pruning / quantification / distillation /automl]
戒烟日志_04 (day_09)
Implementation scheme of shared file
Brush questions_ Linked list related series
RPC practice and core principles - Advanced notes
【PyTorch 模型剪枝实例教程2(结构化剪枝)】
Opencv_100问_第一章 (1-5)
860. lemonade change