首页 \ 问答 \ 是否可以使用jquery / javascript将doc / docx转换为html?(Is it possible to convert doc/docx to html using jquery/javascript? [closed])

是否可以使用jquery / javascript将doc / docx转换为html?(Is it possible to convert doc/docx to html using jquery/javascript? [closed])

我需要将doc / docx转换为html。 我有存储在亚马逊s3中的文件。 我需要在浏览器中查看和编辑它。 现在,我正在使用Apache POI将doc / docx转换为html。 我正在HTML编辑器(Jquery插件)上显示响应。 它工作但对齐/格式更改。 也是未提取的图像。 任何修复图像提取和格式化问题的解决方案,请参考或引用任何Jquery / JS插件进行转换。


I need to convert doc/docx to html. I have files stored in Amazon s3. I need to view & edit it in browser. Right now, I am using Apache POI to convert doc/docx to html. And I am displaying the response on HTML editor(Jquery Plugin). It works but alignment/format changes. Also images not extracted. Any solution to fix image extraction & formatting issues, please refer or refer any Jquery/JS plugin for conversion.


原文:
更新时间:2022-11-27 06:11

最满意答案

您可以将每个设置nil

for index in 0 ..< roomsLiveStates.count {
    roomsLiveStates[index] = nil
}

正如Swift编程语言在其控制流讨论中所说for语法:

这个例子打印五个表中的前几个条目:

for index in 1...5 {
    println("\(index) times 5 is \(index * 5)")
}

...在上面的例子中, index是一个常量,其值在循环的每次迭代开始时自动设置。 因此,它不必在使用之前进行声明。 它只是通过包含在循环声明中隐式声明,而不需要let声明关键字。

正如这说的那样, index是一个常数。 因此,你不能改变它的价值。


You can just set each to nil:

for index in 0 ..< roomsLiveStates.count {
    roomsLiveStates[index] = nil
}

As The Swift Programming Language says in its Control Flow discussion of for syntax:

This example prints the first few entries in the five-times-table:

for index in 1...5 {
    println("\(index) times 5 is \(index * 5)")
}

... In the example above, index is a constant whose value is automatically set at the start of each iteration of the loop. As such, it does not have to be declared before it is used. It is implicitly declared simply by its inclusion in the loop declaration, without the need for a let declaration keyword.

As this says, the index is a constant. As such, you can not change its value.

相关问答

更多
  • 安全的赌注是在打开之前检查nil。 var orderLegDistance = defaultValue if myOrder.OrderLegDistance != nil { orderLegDistance = myOrder.OrderLegDistance! } 如果您的逻辑要求,您可以使用相同类型的检查来确定您需要忽略myOrderLegDistance的值。 The safe bet would be to check for nil before unwrapping. var order ...
  • let关键字用于声明无法更改的常量。 如果要修改变量,则应该使用var ,例如: var animals = ["cats", "dogs", "chimps", "moose"] animals.remove(at: 2) //["cats", "dogs", "moose"] 将原始收藏保持不变的非变异替代方法是使用filter创建新集合,而不需要删除元素,例如: let pets = animals.filter { $0 != "chimps" } The let keyword is fo ...
  • 在Swift 3(Xcode 8,目前为beta 6)中你可以做到 if let el = array.first(where: { $0.name == key }) { // `el` is the first array element satisfying the condition. // ... } else { // No array element satisfies the condition. } 使用Sequence协议的first(where:)方法: // ...
  • flatMap()完成这项工作: let filtered = arrayOfAnimal.flatMap { $0 } 闭包(这是此处的身份)应用于所有元素,并返回具有非零结果的数组。 返回类型是[Animal] ,不需要强制转换。 简单的例子: let array: [Int?] = [1, nil, 2, nil, 3] let filtered = array.flatMap { $0 } print(filtered) // [1, 2, 3] print(type(of ...
  • 我建议您存储图像名称,而不是将所有图像保存在内存中: let iconImages = ["ion-home", "ms-medkit", "ion-edit", "ion-clipboard", "ion-waterdrop", "ion-calendar"] 并在需要时直接预加载每个图像。 它不会影响性能,因为它是小图标。 代码看起来也更干净。 func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> ...
  • 你得到nil因为该URL包含一个空格。 您需要首先对字符串进行编码,然后将其转换为URL。 func getJSON(strURL: String) { if let encoded = strURL.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed), let myURL = URL(string: encoded) { print(myURL) } var dictR ...
  • 有三种可能性: (1)故事板中的按钮插座未正确连接。 (2)这个ViewController实例不是故事板中的一个。 (3)你过早地调用这段代码(例如在prepareForSegue )。 There are three possibilities: (1) The button outlet is not correctly connected in the storyboard. (2) This ViewController instance is not the one in the storybo ...
  • 这种定义数组的方法是给你一个Optional数组的可选值( WaterUsage?[]? ),你必须先解开它才能使用。 我想你只想要值是可选的: WaterUsage?[] 。 我能够做到的一种方法是使用通用的Array语法: var usage: WaterUsage?[] = Array(count:24, repeatedValue:nil) usage[hour] = something 另一种方法是强制解包初始声明的返回值。 我不知道为什么,但WaterUsage?[] ...
  • 您可以将每个设置nil : for index in 0 ..< roomsLiveStates.count { roomsLiveStates[index] = nil } 正如Swift编程语言在其控制流讨论中所说for语法: 这个例子打印五个表中的前几个条目: for index in 1...5 { println("\(index) times 5 is \(index * 5)") } ...在上面的例子中, index是一个常量,其值在循环的每次迭代开始时自动设置。 因此, ...
  • if let在添加/更新字典中的值时忽略nil值,请使用此选项。 if let clrThree = colorClass.colorThree { myDict.updateValue(clrThree, forKey: "thirdKey") } if let clrFour = colorClass.colorFour { myDict.updateValue(clrFour, forKey: "fourthKey") } 崩溃的原因是,你正在使用! 在colorClass.c ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)