Coder Social home page Coder Social logo

Comments (14)

Hufe921 avatar Hufe921 commented on May 20, 2024

需求场景能描述一下吗

from canvas-editor.

yicheng2022 avatar yicheng2022 commented on May 20, 2024

比如这一页有表格,有文字,有图片。我想复制这一页的数据,直接粘贴到新的一页上面。

from canvas-editor.

Hufe921 avatar Hufe921 commented on May 20, 2024

v0.9.38
获取某一页数据:https://hufe.club/canvas-editor-docs/guide/command-get.html#getvalue
追加元素:https://hufe.club/canvas-editor-docs/guide/command-execute.html#executeappendelementlist

from canvas-editor.

yicheng2022 avatar yicheng2022 commented on May 20, 2024

v0.9.38 获取某一页数据:https://hufe.club/canvas-editor-docs/guide/command-get.html#getvalue 追加元素:https://hufe.club/canvas-editor-docs/guide/command-execute.html#executeappendelementlist

老大,getValue里面传的pageNo是怎样获取呢?我在文档里面没有找到获取当前页码的方法。

from canvas-editor.

Hufe921 avatar Hufe921 commented on May 20, 2024

当前光标所在的页码?

from canvas-editor.

yicheng2022 avatar yicheng2022 commented on May 20, 2024

当前光标所在的页码?

是的

from canvas-editor.

Hufe921 avatar Hufe921 commented on May 20, 2024

https://hufe.club/canvas-editor-docs/guide/command-get.html#getrangecontext

from canvas-editor.

yicheng2022 avatar yicheng2022 commented on May 20, 2024

https://hufe.club/canvas-editor-docs/guide/command-get.html#getrangecontext

这个是哪个版本的功能呢?我在0.9.38的代码里面没有找到这个方法。

from canvas-editor.

Hufe921 avatar Hufe921 commented on May 20, 2024

v0.9.39

from canvas-editor.

yicheng2022 avatar yicheng2022 commented on May 20, 2024

v0.9.39

刚刚拉最新的版本测试了一下,感谢大佬!
不过发现一个小问题,就是如果最后一页内容很少(只有半页或者几行字),他是直接在最后一页的内容后面增加内容了,没有新建一个空白页,再把内容给放到新页里面去。

from canvas-editor.

Hufe921 avatar Hufe921 commented on May 20, 2024

直接在新页面追加元素,可以使用换页符

instance.command.executeAppendElementList([{
    type: ElementType.PAGE_BREAK,
    value: ''
  }, ........])

from canvas-editor.

yicheng2022 avatar yicheng2022 commented on May 20, 2024

直接在新页面追加元素,可以使用换页符

instance.command.executeAppendElementList([{
    type: ElementType.PAGE_BREAK,
    value: ''
  }, ........])

好的,我试试,感谢!

from canvas-editor.

yicheng2022 avatar yicheng2022 commented on May 20, 2024

直接在新页面追加元素,可以使用换页符

instance.command.executeAppendElementList([{
    type: ElementType.PAGE_BREAK,
    value: ''
  }, ........])

image
分页符打印的时候怎么去掉呢?设置了颜色为白色好像也没有起作用。

from canvas-editor.

Hufe921 avatar Hufe921 commented on May 20, 2024

使用清洁模式https://hufe.club/canvas-editor-docs/guide/option.html EditorMode.CLEAN

from canvas-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.